Is there any reason to introduce this intermediate variable (sz)?

John Gordon gordon at panix.com
Tue Nov 17 16:02:33 EST 2015


In <bad9ac66-38aa-4445-a486-6df0e9c7752c at googlegroups.com> fl <rxjwg98 at gmail.com> writes:

> correctly. Could you see something useful with variable 'sz'?

'sz' is fewer characters than '(n_iter,)', which may make your code easier
to read.

The np.zeros() function explicitly accepts an 'int or sequence of ints',
so you don't specifically need a sequence.  Is the same true for the
'size' keyword argument of np.random.normal()?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list