[Numpy-discussion] Easter Egg or what I am missing here?

Siegfried Gonzi siegfried.gonzi at ed.ac.uk
Wed May 21 15:29:33 EDT 2014

Please would anyone tell me the following is an undocumented bug 
otherwise I will lose faith in everything:

import numpy as np

years = [2004,2005,2006,2007]

dates = [20040501,20050601,20060801,20071001]

for x in years:

     print 'year ',x

     xy =  np.array([x*1.0e-4 for x in dates]).astype(np.int)

     print 'year ',x

Or is this a recipe to blow up a power plant?


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

More information about the NumPy-Discussion mailing list