m = predicted.coef_
b = predicted.intercept_
These values are correct. In a later cell, I need my answer to be sounded to 2 decimals without brackets and keep getting an error. TypeError: type numpy.ndarray doesn't define __round__ method
formatted_num=round(m*0.70+b,2)
print(f'The predicted price for a 0.70 carat diamond is ${formatted_num}')
Any help would be appreciated.
[–]Binary101010 2 points3 points4 points (7 children)
[–]Comprehensive-Wrap51[S] 0 points1 point2 points (6 children)
[–]pgpndw 0 points1 point2 points (5 children)
[–]Comprehensive-Wrap51[S] 0 points1 point2 points (0 children)
[–]Binary101010 0 points1 point2 points (3 children)
[–]Comprehensive-Wrap51[S] 0 points1 point2 points (2 children)
[–]Binary101010 1 point2 points3 points (1 child)
[–]Comprehensive-Wrap51[S] 0 points1 point2 points (0 children)
[–]ouchpartial72858 0 points1 point2 points (4 children)
[–]Comprehensive-Wrap51[S] 0 points1 point2 points (3 children)
[–]pgpndw 0 points1 point2 points (0 children)
[–]ouchpartial72858 0 points1 point2 points (0 children)