Tim Hoffmann

Results 273 comments of Tim Hoffmann

> Technically with this format I can do Tuple[str, list, dict] for `(name, args, kwargs)` but I dunno if that saves anyone work. If you want `Tuple[str, list, dict]`, it...

I have not checked, but maybe there is something in the [python array API standard](https://data-apis.org/array-api/2022.12/index.html) - At least it would belong there.

Would [`__array_namespace__`](https://data-apis.org/array-api/2022.12/API_specification/generated/array_api.array.__array_namespace__.html) be a solution for us?

From an interface perspective, it's reasonable to rely on `__array__`. I think we should investigate how we can make this work internally.

@patel-zeel in my comment https://github.com/matplotlib/matplotlib/issues/25882#issuecomment-1872440671, I hadn't considered the unit problem. That indeed makes the problem much more complicated. To all: To summarize and comment on the above proposed solutions:...

Good point! That may indeed work. e.g. `“torch in sys.modules` is very likely to be true if a user can create and pass to us a torch tensor. It‘s not...

> I am now wondering how to test this feature or should we even consider testing it. Testing this is quite hard because we don't have PyTorch or JAX as...

IMHO further abstraction would be premature. The current implementation is simple and good enough. Paraphrased from https://youtu.be/UANN2Eu6ZnM?feature=shared > If something happens for the first time, do a concrete implementation. If...

> I didn't mean to suggest any complicated abstraction; I was thinking something simple like this: > > [...] > > It reduces duplication of logic and makes it easier...

> hard-coding certain libraries to have a cut around seems incorrect and brittle to me. This is indeed a workaround. The proper way would be for `_unpack_to_numpy()` to use the...