Ah I see, I will now be aware of that in teh future. Thank you very much 
for your help Olli, I have now fixed up the code and it is now outputting 
the correct value.

Regards,
Bobby

On Tuesday, October 24, 2017 at 11:13:35 PM UTC+11, [email protected] 
wrote:
>
> Hi Bobby,
>
> It seems numpy in Spyder/Anaconda distribution defaults to 32 bit 
> integers, and the largest multiplication overflows giving a wrong result:
>
> Python 3.6.2 |Anaconda, Inc.| (default, Sep 19 2017, 08:03:39) [MSC v.1900 
> 64 bit (AMD64)]
> In: np.product([5, 5, 7, 6, 6, 8, 9, 6, 6, 4, 8, 9, 5])
> Out: 2039787520
> In: np.product([5, 5, 7, 6, 6, 8, 9, 6, 6, 4, 8, 9, 5],dtype="int32")
> Out: 2039787520
> In: np.product([5, 5, 7, 6, 6, 8, 9, 6, 6, 4, 8, 9, 5],dtype="int64")
> Out: 23514624000
>
> Regards,
>    Olli
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to