You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there any particular reason to use numpdy ndarrays concrete types instead of Protocols?
This is a issue I already talked about in Polars here: pola-rs/polars#24436
If numpy is not installed in the venv, the LSP will complain each time I'm updating narwhals/polars about unknown numpy types, and I have to manually delete them to fix it.
I think it's a valid request
Dan's comment:
Yeah I think using Protocols more would help your use-case
I've been adding some for solving the same issue in narwhals._native.py - but hadn't considered numpy.
I think the main challenge with ndarray is that we'd need to define something that only matches that - but doesn't match the 8474930 other things that based their API on it π
TBH I'd be ok with accidentally matching something non-numpy, if it's not supported there'll be a runtime error anyway