Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

casting toquaddtype emits uneccesary warnings #163

Open
@mattip

Description

@mattip

When usingnp.astype and the array hasinf ornan, I see aRuntimeWarning: invalid value encountered in cast. On internal numpy float dtypes these are not emitted.

Run withpython -Walways

import numpy as npimport numpy_quaddtypea = np.arange(30, dtype=np.float32); a[-1] = np.infq = numpy_quaddtype.QuadPrecisiond = np.float64warns = a.astype(q)# <stdin>:1: RuntimeWarning: invalid value encountered in castnowarns = a.astype(d)# This does not warnwarns.astype(d)

I think this is coming from sleef?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp