8000 BUG: np.random.zipf hangs the interpreter on pathological input · Issue #9829 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
BUG: np.random.zipf hangs the interpreter on pathological input #9829
Closed
@eric-wieser

Description

@eric-wieser
>>> np.random.zipf(np.nan) 
# hangs forever, doesn't respond to ctrl C
>>> np.random.zipf(1.0000000000001)
# hangs for a possibly finite but very long time, also not responding to Ctrl+C

The former should probably just throw an exception. The latter is sort of inevitable with a rejection algorithm, but if we called PyErr_CheckSignals() then at least it could be cancelled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0