Skip to content

sample_entropy not matching data types #27

@fstinner

Description

@fstinner

I always get error messages with the function "sample_entropy" that the types at _numba_sampen are not the correct ones:
"No matching definition for argument type(s) readonly array(float64, 1d, C), int64, float64".

I was able to fix the error by hard specifying the data types:
Old:
if metric == "chebyshev" and x.size < 5000: return _numba_sampen(x, order=order, r=0.2 * x.std(ddof=0))

New:
if metric == "chebyshev" and x.size < 5000: return _numba_sampen(x.astype(np.float64), order=np.int32(order), r=np.float64(0.2 * x.std(ddof=0)))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions