[AstroPy] why the warning about Converting Quantity?
Jonathan Slavin
jslavin at cfa.harvard.edu
Thu Mar 21 14:20:37 EDT 2013
Hi,
I have just used the constants module in astropy for the first time and
got 6 warnings from my code as a result:
import astropy.constants as const
AU = const.au.to('km')
leads to
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
WARNING: Converting Quantity object in units 'km' to a Numpy array
[astropy.units.quantity]
It seems that I get the warning every place I use the value of AU. Do I
have to turn off warnings to prevent this? Is there some other way to
deal with this?
Jon
--
______________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
______________________________________________________________
More information about the AstroPy
mailing list