Sebastian Berg

Results 913 comments of Sebastian Berg

@Kirill888 there is a hot-fix that will be in 2.1.x (soon) and 2.2. (also not far future). Although, it would be nice to figure out a clean way to handle...

I have mixed feelings about the suggestion. In most cases NumPy always broadcasts, but there are exceptions where it isn't clear that the arguments are on a similar standing (one...

I think this is fine, but it should work by converting to an array via normal `asarray()` logic? I.e. flat defines `__array__()`.

I am saying that we shouldn't implement `arr.flat` speficically, but if we do that implement any integer array-like just like normal indexing.

Something like that. The best thing may be to just call the normal indexing preparation code to ensure we do the same thing. Not sure if that works, but I...

No, not a complete adjustment hopefully, you would call: https://github.com/numpy/numpy/blob/cc9f8aae7bdb9fa7d56bc64bdc47f71839715f6d/numpy/_core/src/multiarray/mapping.c#L277 and then need to use the result of that. But after it, you don't have to deal with conversion anymore.

Hmmm, True, so it might not actually work without changes. It may be that all it needs from the array is the number of dimensions, but not sure.

Well, I can see that re-using `mapping.c` is too much hassle/not worthwhile. But I still think that this can be more generic and just cast to array generally (i.e. be...

I want to fix it to do the same thing as for arrays, but I am slightly confused why `np.arange(3)[np.array([], dtype="S")]` does the right thing.

Oh, nvm, let's just just remove the test, or only test for a string array. The array case just lets this one pass, because it can't doesn't distinguish between a...