Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

body_fat_percentage occur a error message #1

Open
duoan opened this issue Sep 20, 2017 · 0 comments
Open

body_fat_percentage occur a error message #1

duoan opened this issue Sep 20, 2017 · 0 comments

Comments

@duoan
Copy link

duoan commented Sep 20, 2017

Hi boy:
I found there is a issue when run in python3 and numpy 1.21.1

print("My PBF = {:.2f}% +/- {:.2f}%".format(my_pbf, -scores.mean()))

This line will occur a error like bellow message tip:

TypeError                                 Traceback (most recent call last)
<ipython-input-35-00d458076588> in <module>()
      2 scaled = scaler.transform(measurements)
      3 my_pbf = ridge.predict(scaled)+data['pbf_b'].mean()
----> 4 print("My PBF = {:.2f}% +/- {:.2f}%".format(my_pbf, -scores.mean()))

TypeError: unsupported format string passed to numpy.ndarray.__format__

I check this my_pbf is a array variable , so I change me code to

print("My PBF = {:.2f}% +/- {:.2f}%".format(my_pbf[0], -scores.mean()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant