[Numpy-discussion] Proposal: "intrange" for inclusive integer intervals

2023-05-04 Thread cameron . pinnegar
Getting a closed interval is awkward. Let's say you want an array of the integers from a to b, inclusive at both ends. e.g. for a=10 b=15, you want: [10, 11, 12, 13, 14, 15] Neither linspace nor arange makes this easy. arange(a, b) # wrong, it only goes up to 14 arange(a, b+1) # right, but awkw

[Numpy-discussion] Re: Proposal: "intrange" for inclusive integer intervals

2023-05-04 Thread Robert Kern
I'm personally not particularly interested in this direction. Because there are so many options, you basically have 6 separate functions that you have to document in one docstring, and each one is a 1- or 2-liner with `arange`. That isn't enough semantic compression to justify a new function, for m