I have a need to index my array(s) starting with a 1 instead of a 0.
The reason for this is to be consistent with the documentation of a
format I'm accessing. I know I can just '-1' from what the
documentation says, but that can get cumbersome.
Is there a magic flag I can pass to a numpy array
Hi Jeremy
On Thu, Jul 28, 2011 at 3:19 PM, Jeremy Conlin jlcon...@gmail.com wrote:
I have a need to index my array(s) starting with a 1 instead of a 0.
The reason for this is to be consistent with the documentation of a
format I'm accessing. I know I can just '-1' from what the
documentation
Don't forget the everything-looks-like-a-nail approach: make all your
arrays one bigger than you need and ignore element zero.
Anne
On 7/28/11, Stéfan van der Walt ste...@sun.ac.za wrote:
Hi Jeremy
On Thu, Jul 28, 2011 at 3:19 PM, Jeremy Conlin jlcon...@gmail.com wrote:
I have a need to
On Thu, Jul 28, 2011 at 4:10 PM, Anne Archibald
aarch...@physics.mcgill.ca wrote:
Don't forget the everything-looks-like-a-nail approach: make all your
arrays one bigger than you need and ignore element zero.
Hehe, why didn't I think of that :)
I guess the kind of problem I struggle with more
On 29.07.2011, at 1:19AM, Stéfan van der Walt wrote:
On Thu, Jul 28, 2011 at 4:10 PM, Anne Archibald
aarch...@physics.mcgill.ca wrote:
Don't forget the everything-looks-like-a-nail approach: make all your
arrays one bigger than you need and ignore element zero.
Hehe, why didn't I think of
On Thu, Jul 28, 2011 at 4:26 PM, Derek Homeier
de...@astro.physik.uni-goettingen.de wrote:
I guess the kind of problem I struggle with more frequently is books
written with summations over -m to +n. In those cases, it's often
convenient to use the mapping function, so that I can enter the
The can is open and the worms are everywhere, so:
The big problem with one-based indexing for numpy is interpretation.
In python indexing, -1 is the last element of the array, and ranges
have a specific meaning. In a hypothetical one-based indexing scheme,
would the last element be element 0? if
On 29.07.2011, at 1:38AM, Anne Archibald wrote:
The can is open and the worms are everywhere, so:
The big problem with one-based indexing for numpy is interpretation.
In python indexing, -1 is the last element of the array, and ranges
have a specific meaning. In a hypothetical one-based