Skip to content

1D np.linalg.norm not preserving input dtype? #10364

Closed
@kmaehashi

Description

@kmaehashi

I saw the v1.14.0 release note saying:

1D np.linalg.norm preserves float input types, even for arbitrary orders

However, when I try the code on the release note, it does not behave as it says.

>>> import numpy as np
>>> np.__version__
'1.14.0'
>>> f32 = np.float32([1, 2])
>>> np.linalg.norm(f32, 2.0).dtype
dtype('float32')
>>> np.linalg.norm(f32, 2.0001).dtype
dtype('float64')  # it should be float32 on numpy 1.14?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions