quantities spams the terminal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-quantities |
Fix Released
|
Critical
|
Darren Dale |
Bug Description
in quantities 0.5.0 the terminal is spammed quite a bit. it seems to be related to the auto-converting __add__ and such:
In [1]: import quantities as pq
# lots and lots of junk
In [2]: a = 1 * pq.m
1.0 <type 'numpy.ndarray'>
In [3]: b = 1 * pq.um
1.0 <type 'numpy.ndarray'>
In [4]: a + b
1.0 <type 'numpy.ndarray'>
1e-06 <type 'numpy.ndarray'>
1e-06 <type 'numpy.ndarray'>
1.0 <type 'numpy.ndarray'>
1.0 <type 'numpy.ndarray'>
1.0 <type 'numpy.ndarray'>
1.000001 <type 'numpy.ndarray'>
Out[4]: array(1.
In [5]: a + a
2.0 <type 'numpy.ndarray'>
Out[5]: array(2.0) * m
quantities shouldn't be echoing assignments (input 2 and 3 above) nor intermediate computations (input 4). it seems that adding two values with the same units just echos as well, without intermediate steps (input 5). there's also a massive (hundreds of lines) dump when quantities is imported.
Changed in python-quantities: | |
status: | In Progress → Fix Committed |
Changed in python-quantities: | |
status: | Fix Committed → Fix Released |
Well, that's embarrassing. I'll fix it right away.