Skip to content

cp.full with np.nan broken #8391

Closed
Closed
@ilan-gold

Description

Description

It seems like a numpy 2 thing, but using cp.full with fill_value=np.nan is broken, and previously worked.

To Reproduce

import numpy as np, cupy as cp

out = cp.full((2, 2), np.nan)

Installation

Wheel (pip install cupy-***)

Environment

OS                           : Linux-4.18.0-513.11.1.el8_9.x86_64-x86_64-with-glibc2.28
Python Version               : 3.11.7
CuPy Version                 : 13.2.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 2.0.0
SciPy Version                : None
Cython Build Version         : 0.29.36
Cython Runtime Version       : None
CUDA Root                    : /usr/local/cuda
nvcc PATH                    : /usr/local/cuda/bin/nvcc
CUDA Build Version           : 12040
CUDA Driver Version          : 12030
CUDA Runtime Version         : 12040 (linked to CuPy) / 12030 (locally installed)
cuBLAS Version               : (available)
cuFFT Version                : 11012
cuRAND Version               : 10304
cuSOLVER Version             : (11, 5, 4)
cuSPARSE Version             : (available)
NVRTC Version                : (12, 3)
Thrust Version               : 200200
CUB Build Version            : 200200
Jitify Build Version         : <unknown>
cuDNN Build Version          : 8801
cuDNN Version                : 8500
NCCL Build Version           : (not loaded; try `import cupy.cuda.nccl` first)
NCCL Runtime Version         : (not loaded; try `import cupy.cuda.nccl` first)
cuTENSOR Version             : None
cuSPARSELt Build Version     : None
Device 0 Name                : Tesla V100-SXM3-32GB
Device 0 Compute Capability  : 70
Device 0 PCI Bus ID          : 0000:C0:00.0

Additional Information

Version info:

asttokens==2.4.1
cupy-cuda12x==13.2.0
decorator==5.1.1
executing==2.0.1
fastrlock==0.8.2
ipython==8.25.0
jedi==0.19.1
matplotlib-inline==0.1.7
numpy==2.0.0
parso==0.8.4
pexpect==4.9.0
prompt-toolkit==3.0.47
ptyprocess==0.7.0
pure-eval==0.2.2
pygments==2.18.0
six==1.16.0
stack-data==0.6.3
traitlets==5.14.3
typing-extensions==4.12.2
wcwidth==0.2.13

and this works with:

numpy==1.26.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions