n Thu, Nov 21, 2024 at 2:18 PM Robert Kern wrote:
> On Thu, Nov 21, 2024 at 2:00 PM Slavin, Jonathan via NumPy-Discussion <
> numpy-discussion@python.org> wrote:
>
>> Hi all,
>>
>> I was trying to use meshgrid with three arrays and got some odd results.
>&g
Hi all,
I was trying to use meshgrid with three arrays and got some odd results.
Here's a simple example:
xt = np.array([1,2,3,4])
yt = np.array([6,7,8])
zt = np.array([12,13])
xxx,yyy,zzz = np.meshgrid(xt,yt,zt)
So I would expect that xxx[0,0,:] = array([1,2,3,4])
instead I get xxx[0,0,:] = array
I'm not sure which numpy version you're using (I don't get that using numpy
1.14.3), but the issue is that for some reason the data type (dtype) of the
array is being assumed to be a 4 byte integer or ' wrote:
> From: Yuping Wang
> To: numpy-discussion@python.org
> Cc:
> Bcc:
> Date: Tue, 29 Jan
Hi Kirill,
T
he idea is that each tuple assigns a name to the field and a data type.
There are a variety of ways to create structured arrays but they all
involve giving both a name and data type to each field (I think). See
https://docs.scipy.org/doc/numpy/user/basics.rec.html
Jon
On Fri, M