Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable datetime comparisons for fields with LazyExprs #409

Description

@lshaw8317

The following code throws an error since numexpr does not appear to support datetime datatype comparisons.

N = 1000
rng = np.random.default_rng(seed=1)
it = ((-x + 1, x - 2, rng.normal()) for x in range(N))
sa = blosc2.fromiter(
    it, dtype=[("time", "<M8[s]"), ("A", "f4"), ("B", "f8")], shape=(N,), urlpath="sa-1M.b2nd", mode="w"
)

expr = sa["time"] < 1000
print(expr[:]) #throws error

In addition, it would be good to support expr = sa["time < 1000"] as well (which also throws an error).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions