[Numpy-discussion] Consistency of random number functions APIs.
Some NumPy random number generation functions take a dtype parameter whereas others don't. Some of them take an out parameter whereas others don't. Just glancing at it, there seems to be no rhyme or reason why this would be the case but is there some hidden consistency underneath the hood to explain why some have these params and others don't? Is there any reason that things like random.randn and numpy.random.Generator.normal don't take a dtype and out parameters? If I need to create a huge array of random numbers whose dtype is float16 or float32 then what is the BKM to do this when the routine I would like to use generates an array of float64 and with the 64-bit data type the array won't fit in memory? ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
[Numpy-discussion] argmin/argmax underspecification?
The docs say "Returns the indices of the maximum values along an axis." When axis=None, I presume the implementation is actually "Returns the first index (assuming ravel ordering) of the maximum value." I also presume that people are now relying on the fact that it always returns the first such index. So, maybe the docs should be updated? ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com