[AstroPy] Problem with the latest version of astropy and numpy
kanderso at gemini.edu
Fri Aug 23 11:04:23 EDT 2019
I cannot be sure how this problem arises for you, but what can be said is
that an AttributeError thrown from the numpy object is way off base for
that function. According the docstr on the* _result_as_quantity()*, the
return object, i.e. the *'out'* object, should be an
*astropy.units.Quantity* object, not a *numpy* object.
It is unclear where things got confused in the call stack: perhaps an
incorrect object type was passed initially? You may want to *absolutely
ensure* that this did work under the previous versions. And if so, then it
would seem something is amiss in that astropy call stack.
>From the docstr:
*_result_as_quantity(self, result, unit, out):
* [ ... ]
* result : *`~numpy.ndarray` or tuple of `~numpy.ndarray`
Array(s) which need to be turned into quantity.
* unit : `~astropy.units.Unit` or None
Unit for the quantities to be returned (or `None` if the result
should not be a quantity). Should be tuple if result is a
* out : `~astropy.units.Quantity` or None
Possible output quantity. Should be `None` or a tuple if result
is a tuple.
* out : `~astropy.units.Quantity`
* With units set.*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the AstroPy