[Numpy-discussion] Distance Formula on an Array
Sun Apr 26 17:48:53 CDT 2009
Ian Mallett wrote:
> Yeah, I ended up finding the  bit at the end through trial and
> error. I actually do need the indices, though.
If you are not already doing so, I strongly recommend using ipython. It
is enormously useful in accessing docstrings (type a function name
followed by a question mark), source code (same, but with two question
marks), listing namespaces, finding functions, testing, running the pdb
> I'm having a strange new problem though.
> is returning a sequence??? I'm really confused.
In :import numpy as np
In :x = np.array([1,2,3])
Out:array([1, 2, 3])
The term "sequence" is a generality to include tuples, lists, ndarrays,
and potentially other such ordered containers.
But where are you seeing the ndarray instance created by numpy.array()
referred to as a "sequence"? It's not wrong, but I can see why you
might not expect it.
More information about the Numpy-discussion