Repository navigation
Quantity throws an unrelated warning when converting through equivalencies? - #779
Conversation
|
I'm tagging this as 0.2.0, but maybe it's not critical enough, so it can be re-tagged as 0.2.1 if desired. |
|
This seems to be a byproduct of the recent constants-as-quantities changes. In the spectral equivalency, there is an entry: Since a constant divided by a float gives us a There are a number of ways to plug this hole, but I'm not sure which is the best. 1) Any other thoughts? |
|
I think I prefer # 3 (in this specific case that means changing the code you mentioned to Although it might also make sense to change this to |
|
Yeah, this should just say |
… should be using the value of c (in m/s) as a scaling factor, but its units shouldn't really come into it. This should have been changed to c.value and h.value as part of astropy#745.
|
How's this attached fix look? |
|
Well, that looks simple enough! |
|
seems fine to me |
|
Segfaults in Travis? I don't even.... 😡 I'm going to go ahead and safely ignore that and merge this. |
Quantity throws an unrelated warning when converting through equivalencies?
Quantity throws an unrelated warning when converting through equivalencies?
|
@iguananaut the current master branch seems to still be giving the same segfault, but only for numpy 1.4 . I'm checking it now on a local copy of 1.4 |
Quantity throws an unrelated warning when converting through equivalencies?
I just noticed this one:
It seems to get the conversion right, but it looks like the issue is deep in the units code for converting with equivalencies -- it looks like somewhere
_si.his getting converted into an array, but I don't see where (from a quick dig through the code). Maybe @mdboom knows where this could be?