Skip to content

Unable to multiply quantities by numbersΒ #90

@mccarthy677

Description

@mccarthy677

Did you find a bug? Please help us improve by fill out the sections below. πŸ‘

Describe the bug

It's no longer possible to generate a quantity by multiplying a number by a ScalarQuantity unit

To Reproduce

Steps to reproduce the behavior:

cptest = 10*cp.ScalarQuantity('Hz')
TypeError: unsupported operand type(s) for *: 'int' and 'ScalarQuantity'

Expected behavior

I would expect the same result as:
cptest = cp.ScalarQuantity('10 Hz')

Desktop (please complete the following information):

  • OS: Windows
  • Python version: 3.9.7
  • csdmpy version: 0.6.0
  • astropy version (in case you need it): 6.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions