Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

test_linspace error with numpy

Open
#195 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
numpy
Domain
testing

Research direction

Start with array_api_tests/test_creation_functions.py::test_linspace and reproduce the falsifying example using num=1, dtype=numpy.float32, endpoint=False, start=-0.0, and stop=-1.0. Read the linked linspace specification to determine whether preserving negative zero is required; done means the test behavior and expectation match the specification.

Written by the indexing model from the issue text.

Description

FAILED array_api_tests/test_creation_functions.py::test_linspace - AssertionError: out[0]=0.0, should be -0.0 [linspace()]
Falsifying example: test_linspace(
    num=1,
    dtype=numpy.float32,
    endpoint=False,
    data=data(...),
)
Draw 1 (start): -0.0
Draw 2 (stop): -1.0
Draw 3 (kw): {'dtype': numpy.float32, 'endpoint': False}

Not clear if this is actually required by the spec or not. See https://data-apis.org/array-api/latest/API_specification/generated/array_api.linspace.html

Dominant language
Python
Stars
74
Forks
54
Avg merge
4h 35m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from data-apis/array-api-tests

All issues in data-apis/array-api-tests

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.