[Numpy-discussion] Adding a 2D with a 1D array...

Ruben Salvador rsalvador.wk at gmail.com
Thu Sep 10 09:47:00 EDT 2009


Well...you are right, sorry, I just thought 'np.shape(offspr)' result would
be enough. Obviously, not!

offspr wasn't actually a numpy array, but a Python list. I'm sorry for the
inconvenience but I didn't realize....I'm just changing my code so that I
just use numpy arrays, and forgot to change offspr definition :S It's always
better not to hurry and check the changes deeper.

I'lll put some time in profiling the code properly later on....now I just
need to finish this! Any pointer where to start a rationale 'sane profiling
techniques'? I love reading details and explanations, but don't have the
time to go through hundreds of pages right now, so...some good trade-off
between practical and extensive docs?

Thanks everybody!

On Thu, Sep 10, 2009 at 2:32 PM, Francesc Alted <faltet at pytables.org> wrote:

>  A Thursday 10 September 2009 14:22:57 Dag Sverre Seljebotn escrigué:
>
> > > > (Also a guard in timeit against CPU frequency scaling errors would be
>
> > > >
>
> > > > great :-) Like simply outputting a warning if frequency scaling is
>
> > > >
>
> > > > detected).
>
> > >
>
> > > Sorry, I don't get this one.
>
> >
>
> > I had some trouble getting reliable benchmarks on my own computer until
>
> > I realised that the power-saving capabilities of my CPU down-throttled
>
> > the clock speed when it was not in use. Thus if I did two calls to
>
> > timeit right after one another, the second would always report lower
>
> > runtime, because the first one started at a lower clock speed.
>
> :-) Good point
>
> >
>
> > Changing a BIOS setting solved this, but it might be a gotcha which e.g.
>
> > timeit and IPython could report (they could just inspect the CPU
>
> > information and emit a warning -- or, do something to throttle up the
>
> > CPU to full speed first).
>
> --
>
> Francesc Alted
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090910/6cc1f62b/attachment.html>


More information about the NumPy-Discussion mailing list