Skip to content

[BUG] cupynumeric.linspace(True, False, num=3) produces inconsistent results #1279

Description

@apiqwe

Software versions

System info:
  Python      :  3.14.6 | packaged by conda-forge | (main, Aug 11 2026, 10:26:15) [GCC 14.4.0]
  Platform    :  Linux-6.17.0-29-generic-x86_64-with-glibc2.39
  GPU driver  :  595.71.05
  GPU devices :
    GPU 0 :  NVIDIA GeForce RTX 4090

 Error Loading numa symbols, please install libnuma to avoid any performance issues
Package versions:
  realm       :  (failed to detect)
  legion      :  legion-25.12.0-75-g7b770cff5-dirty (commit: 7b770cff5b95a516c3244cc3a0500ce3720967d9)
  legate      :  26.06.01
  cupynumeric :  26.06.01
  numpy       :  2.4.6
  scipy       :  1.16.3
  numba       :  (failed to detect)

Legate build configuration:
  build_type        :  Release
  use_openmp        :  True
  use_cuda          :  True
  networks          :  ucx
  conduit           :  
  configure_options :  --LEGATE_ARCH=arch-conda;--with-python;--with-cc=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-cc;--with-cxx=/tmp/conda-croot/legate/_build_env/bin/x86_64-conda-linux-gnu-c++;--build-march=haswell;--cmake-generator=Ninja;--with-openmp;--with-cuda;--build-type=release;--with-ucx

Package details:
  legate      :  legate 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/legate)
  cupynumeric :  cupynumeric 26.6.1 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/cupynumeric)
  numpy       :  numpy 2.4.6 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/numpy)
  scipy       :  scipy 1.16.3 (installer: conda, path: /opt/conda/envs/cupynumeric/lib/python3.14/site-packages/scipy)
  numba       :  (failed to detect)

Conda package details:
  prefix       :  /opt/conda/envs/cupynumeric
  cuda-version :  cuda-version-13.2-he2cc418_3 (https://conda.anaconda.org/conda-forge/noarch)
  legate       :  legate-26.06.01-cuda13_py314_ucx_gpu_g3249a596f_0 (https://conda.anaconda.org/legate/linux-64)
  cupynumeric  :  cupynumeric-26.06.01-cuda13_py314_gpu_g7d7836ce_0 (https://conda.anaconda.org/legate/linux-64)

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

cupynumeric.linspace(True, False, num=3) outputs the correct result.

Observed behavior

The result of cupynumeric.linspace(True, False, num=3) is inconsistent with numpy.linspace(True, False, num=3).

Example code or instructions

import numpy as np
import cupynumeric as cp

print(np.linspace(True, False, num=3))
print(cp.linspace(True, False, num=3))

Stack traceback or browser console output

[1.  0.5 0. ]
[1.  1.5 0. ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions