Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@kmaehashi

Description

@kmaehashi
Issue body actions

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.