Live data from Hacker News

From Python to Numpy

labri.fr

21–30 of 55 posts

Re: From Python to Numpy

#21

Does the book exist in PDF?

I've failed to build pdf from book.tex produced by rst2latex.py (the issues are likely fixable if you work with latex).

I've converted the rst files to e-book using rst2html.py + calibre instead.

Re: From Python to Numpy

#22
post #11

As someone who has used numpy for many years and written a great deal of production code using it, I was surprised when I read through this and saw some numpy tricks that I didn't know regarding the speeds of various operations! This is really a fantastic reference that provides a deeper level of understanding of what numpy does under the hood. One thing I will highlight that the author just touched on briefly, is th…

Just to jump on the numba train, I've generally found it to reliably obtain C like performance from C-like Python code. This property also holds when you use Python as a preprocessor language for generating computational kernels, which provides a lot of flexibility not evident in the documentation.

It also has simple-to-use openmp-like multicore parallelization, limited class support, AOT compilation and CUDA & AMD HSAIL support.

Re: From Python to Numpy

#23

Does anyone have a recommendation for something similar to this but for Python itself? I have been trying to find something that is not necessarily an intro or crash course book but a book with tips, great explanations, and neat examples (which this e-book(?)/site has). I see that the author has responded to a couple comments here. Thank you for your great work! It's always great to have a nice reference material wit…

Thank you. For some Python introduction, you can have a look at the end of this page: https://github.com/rougier/Scipy-Bordeaux-2016/blob/master/i...

Re: From Python to Numpy

#24
post #11

As someone who has used numpy for many years and written a great deal of production code using it, I was surprised when I read through this and saw some numpy tricks that I didn't know regarding the speeds of various operations! This is really a fantastic reference that provides a deeper level of understanding of what numpy does under the hood. One thing I will highlight that the author just touched on briefly, is th…

Travis Oliphant, Numpy creator, is CEO of Continuum Analytics.

Re: From Python to Numpy

#26
post #5

Earlier quoted context omitted.

I don't mind empty margins, but having 60% of my screen empty for no reason is excessive, and I do read slower because of it. If I want shorter lines, I'll just resize my browser, thanks. I agree with you about the font being too thin, but the line length annoyed me much more.

Optimizing for super-rare users who have a deliberate desire for long lines is less important than optimizing for the vastly-more-common case that the browser's size is large as an artifact of content the user was viewing on a previous site, but the user still prefer a sane line length for text content.

Citation that these users are super rare? Almost everyone I've had conversations with on the subject bemoan too large margins on websites.

Re: From Python to Numpy

#27
post #5

Earlier quoted context omitted.

I don't mind empty margins, but having 60% of my screen empty for no reason is excessive, and I do read slower because of it. If I want shorter lines, I'll just resize my browser, thanks. I agree with you about the font being too thin, but the line length annoyed me much more.

Optimizing for super-rare users who have a deliberate desire for long lines is less important than optimizing for the vastly-more-common case that the browser's size is large as an artifact of content the user was viewing on a previous site, but the user still prefer a sane line length for text content.

[deleted]

Re: From Python to Numpy

#29
I'd be very curious to know if there is any impact to choosing Numpy C ordered arrays or Fortran ordered arrays. As a long time Matlab user (since 1993) who moved to Python 3 years ago, I have always defaulted to Fortran order because it was what I was used to and seemed more intuitive. I did play with C ordered arrays but didn't find an advantage in my limited investigation.

Re: From Python to Numpy

#30
post #20

Does anyone have a recommendation for something similar to this but for Python itself? I have been trying to find something that is not necessarily an intro or crash course book but a book with tips, great explanations, and neat examples (which this e-book(?)/site has). I see that the author has responded to a couple comments here. Thank you for your great work! It's always great to have a nice reference material wit…

I would recommend Julien Danjou's "The Hacker's Guide to Python". He charges $29 for the PDF, but provides updates every year or so. I think it's a great book for getting more depth out of Python. :) Topics include: modules/libraries, documentation, distribution, virtual environments, unit testing, methods/decorators, functional programming, optimization, scaling, RDBMS, and more. https://thehackerguidetopython.com/

Thanks for the suggestion! I downloaded the free chapter from the book and I'm going to check it out tonight. If I enjoy it, I might have to buy the physical and electronic copy!
Post reply on HN