static-frame / arraykit

Python C Extensions for StaticFrame
Other
8 stars 2 forks source link

Implement `isfalsy_array_object()` #59

Closed flexatone closed 1 year ago

flexatone commented 3 years ago

This routine, specialized for object arrays, might be implemented more efficiently in C.

    post = np.empty(array.shape, dtype=DTYPE_BOOL)
    for coord, v in np.ndenumerate(array):
        post[coord] = not bool(array[coord])
    return post | np.not_equal(array, array)