Sebastian Berg

Results 913 comments of Sebastian Berg

We could (and should probably anyway) for example add an `np.dtypes.common_dtype()` which returns `type(np.dtype("U"))`. Which then cleanly has no string size information. That may or may not match what you...

> I'm using jupyter notebook. I think this is common. I think it may make sense to focus attention on creating an html representation for arrays, which could probably much...

Heh, didn't know that newer versions of the stable ABI don't implicitly do the object cast for you in `Py_INCREF` anymore. (A bit surprising on first thought but easy to...

I don't mind this change. It seems right that this is far less impactful than the scalar repr change if it only kicks in when eval round-tripping can't possibly work...

Yeah, while an `ndim` or `ndmax` would be useful information, a shape tuple is probably really just useful for verification (even if you allow `(-1, 3)`); unless you allow reshaping,...

> p.s. I did have one further alternative, which would be to replace the ... in summarization with something indicating the I remember seeing this discussed as an issue or...

You can also use `legacy="..."` printoptions to avoid the new repr (that defers the problem a bit maybe). Although, in this case since it seems like a single test, maybe...

A `PyArray_DescrProto` is an *uninitialized* object, it doesn't have a refcount before you register it. But yeah, if you do heap allocate it, you should free it on NumPy 2,...

For Numpy 2 lifetime does not matter. For Numpy 1 I thought the refcount was always ignored and returned witha refcount of 1 and then immortalized. Using a non static...

This seems to go down to `cp.asarray([obj, obj])` failing (i.e. cupy currently accepts anything as an index) ```python import cupy as cp class test: a = cp.arange(10) @property def __cuda_array_interface__(self):...