Skip to content

Unsupported bool dtype and Unsupported bool index #25

@5464jmy

Description

@5464jmy
import numpy as np
import rustynum as rnp

# Using Numpy
a = np.array([1.0, 2.0, 3.0, 4.0], dtype="float32")
a = a.reshape([4,1])
c = np.array([True, False, False, False])
a = a[c] + 2
print(a.mean()) 

# Using RustyNum
b = rnp.NumArray([1.0, 2.0, 3.0, 4.0], dtype="float32")
b = b.reshape([4,1])
d = rnp.NumArray([True, False, False, False], dtype="bool")
b = b[d] + 2
b = b + 2
print(b.mean().item())  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions