quantities spams the terminal

Bug #450807 reported by Ryan James
10
This bug affects 2 people
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.0000009999999999) * m
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.

Revision history for this message
Darren Dale (dsdale24) wrote :

Well, that's embarrassing. I'll fix it right away.

Changed in python-quantities:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Darren Dale (dsdale24)
milestone: none → 0.5.1
Darren Dale (dsdale24)
Changed in python-quantities:
status: In Progress → Fix Committed
Darren Dale (dsdale24)
Changed in python-quantities:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.