[AstroPy] numpy.arange and quantities

Ole Streicher astropy at liska.ath.cx
Tue Nov 29 04:16:03 EST 2016

Leonard Burtscher <burtscher at strw.leidenuniv.nl> writes:
> r=np.arange(0,9,0.1)*u.km
> works.

Sure. But the quantities are already given. I could convert them to
numbers first (with a random unit), like

np.arange(z0/u.m, z1/u.m, dz/u.m) * u.m

But this looks really ugly.



More information about the AstroPy mailing list