Skip to content

units: warning from numpy operation on Quantity arithmetic #3240

@adrn

Description

@adrn

The following gives a warning:

from astropy import units as u
import numpy as np

a = 15 * u.kpc
b = 27 * u.pc

print np.arcsin((b/a))

but doing this does not:

print np.arcsin((b/a).decompose())

The warning is:

RuntimeWarning: invalid value encountered in arcsin
  print np.arcsin((b/a))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions