[Numpy-discussion] different values for ndarray when printed with or without [ ]

Andras Deak deak.andris at gmail.com
Wed Oct 18 08:25:44 EDT 2017


On Wed, Oct 18, 2017 at 12:44 PM, Nissim Derdiger
<NissimD at elspec-ltd.com> wrote:
> Hi all,
>
> I have a ndarray, that shows different values when called like that:
> print(arr) or like that print(arr[0::]).
>
> When changing it back to a python string (with list = arr.tolist()) – both
> prints return same value, but when converting that list back to np array
> (arr=np.array(list)) – the printing issue returns.
>
> Any ideas what may cause that?

Hi Nissim,

I suggest adding some specifics. What is the shape and dtype of your
array? What are the differences in values? In what way are they
different? The best would be if you could provide a minimal,
reproducible example.
Regards,

András


More information about the NumPy-Discussion mailing list