Skip to content

Division of list gives incorrect result #110

Open

Description

@bjodah

Consider:

>>> import quantities as pq
>>> [1000*pq.metre, 1*pq.kilometre]/pq.metre
array([ 1000.,     1.]) * 1/m

Activity

  1. ddale commented on Apr 21, 2016

    @ddale
    Member

    Quantities assumes values in lists are just magnitudes. There is lots of code out there that takes an operation between a list and a quantity to make an array. We could change this behavior, probably, but it would be so significant that it would require a bump in the major version number. Also, a significant portion of the unit tests would have to be modified to pass using the new behavior.

  2. bjodah commented on Apr 21, 2016

    @bjodah
    ContributorAuthor

    I see, thanks for the clarification. I'll just avoid using it this way (or write some small wrapper).

  3. added
    bug
    on Nov 17, 2026
  4. added this to the 0.18.0 milestone on Nov 17, 2026
  5. added
    numpy-integration
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnumpy-integration

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions