sot / Quaternion

Quaternion manipulation
https://sot.github.io/Quaternion
BSD 3-Clause "New" or "Revised" License
3 stars 7 forks source link

proseco tests fail on master #20

Closed jeanconn closed 4 years ago

jeanconn commented 5 years ago
>       logger(f'Got {len(stars)} stars from AGASC at '
               f'ra={q_att.ra:.5f} dec={q_att.dec:.4f}',
               level=1)
E       TypeError: unsupported format string passed to numpy.ndarray.__format__
javierggt commented 5 years ago

Yes, the following code causes this error:

a = np.array(2)
f'ra={a:.5f}'

The current version returns a numpy scalar, which is not recognized as a float by the string format. I will add an if statement to cast the result to float when shape is ().