[Numpy-discussion] Proposing a flattening functionality for deeply nested lists in NumPy

2024-12-30 Thread Mark via NumPy-Discussion
Hello all, Many people have asked how to flatten a nested list into a one-dimensional list (e.g., see this StackOverflow thread ). While flattening a 2D list is relatively straightforward, deeply nested

[Numpy-discussion] ENH: Efficient vectorized sampling without replacement

2025-01-01 Thread Mark via NumPy-Discussion
Hello, Numpy provides efficient, vectorized methods for generating random samples of an array with replacement. However, it lacks similar functionality for sampling *without replacement* in a vectorized manner. To address this limitation, I developed a function capable of performing this task, ach

[Numpy-discussion] unique_2D

2024-12-24 Thread Mark via NumPy-Discussion
Hello, I've made a contribution to Numpy: unique_2D() which determines unique values and counts of a multi-dimensional array for each row (last dimension). As this is my first contribution, I expect some feedback before being added to the final version. The request can be found here: https://git