[Numpy-discussion] ndarray.count() ?

rex rex at nosyntax.com
Mon Sep 11 15:38:33 CDT 2006


Robert Kern <robert.kern at gmail.com> [2006-09-08 06:51]:
> rex wrote:
> > Robert Kern <robert.kern at gmail.com> [2006-09-07 16:35]:
> >> rex wrote:
> >>> This exposed inconsistent randint() behavior between SciPy and the Python
> >>> random module. The Python randint includes the upper endpoint. The SciPy
> >>> version excludes it.
> > 
> > I'm not in a position to argue the merits, but IMHO, when code that
> > previously worked silently starts returning subtly bad results after
> > importing numpy, there is a problem. What possible upside is there in
> > having randint() behave one way in the random module and silently behave
> > differently in numpy? 
> 
> I don't understand you. 

That's because I wasn't making any sense. :(

> Importing numpy does not change the standard library's 
> random module in any way. There is no silent difference in behavior. If you use 
> numpy.random you get one set of behavior. If you use random, you get another. 
> Pick the one you want. They're not interchangeable, and nothing suggests that 
> they ought to be.

Of course you're right. I thought the name would be overwritten, and it isn't.
Sorry for wasting your time. :(

Thanks,

-rex





More information about the Numpy-discussion mailing list