Giter Club home page Giter Club logo

Comments (14)

davidmascharka avatar davidmascharka commented on May 19, 2024 1

I'm up for taking matplotlib and I could do basic file I/O. With mpl are you also wanting to talk about loading and saving images, or should that be covered elsewhere or not covered for this?

from learning_python.

rsokl avatar rsokl commented on May 19, 2024 1

Yeah, I'd only point the reader to PIL in passing, at most. I think imread/imsave and fig.save/fig.load is all that really needs mentioning

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

I like the idea of having string formatting (including f-strings) in here. They're so genuinely useful and make code way cleaner in my opinion.

from learning_python.

rsokl avatar rsokl commented on May 19, 2024

Including image loading and saving would be good. There isn't too much to cover towards that end. Here is a decent matplotlib reference (although I dislike the guy's formatting and writing style). I do think we should teach all matplotlib stuff based off the fig & axis objects.

from learning_python.

rsokl avatar rsokl commented on May 19, 2024

That seals it - string formatting should be included. I guess we should be wary of being too complete, which is what bogs the official docs down, and focus on the most practical aspects. f-strings for sure, specifying number of decimal places, the .format method.

Would you agree that it should be its own sections? It seems like it should, to me.

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

The only reason I'd be slightly wary of talking about image saving/loading is that there are a lot of ways to save and load images. I think it's worth talking about matplotlib's imsave and imread because they're really useful. I'm not sure whether mentioning PIL or any other projects would be valuable too -- maybe as a comment at the end of talking about matplotlib's functionality for images?

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

I would agree that string formatting should have its own section. I agree with not talking about too much functionality. A simple primer and a link to the documentation should be great.

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

@rsokl #21 adds matplotlib functionality. It probably needs a bit of reorganization to better fit with the rest of the content, but it should cover everything a new user needs to get running. PIL doesn't really seem natural to fit in there and I'm not sure it's necessary. If you want to get into image processing in Python then of course it might be useful. That seems like a topic for a different source or a different module though.

from learning_python.

AFederici avatar AFederici commented on May 19, 2024

I decided to add my comments to the already open issues as to not clutter it up more than it needs to be.

Odds and Ends

Overall I thought these were very very useful sections and I will most likely find myself referencing this section more than the rest.

In the opening section pyplot.subplots is colorized red due to the formatting which I thought looked weird because everything else surrounding it is blue.

Matplotlib

In the first code snippet in the third comment it should say "we create both a figure and axis object" not "we figure and axis object"

Under plotting and saving a figure it is mentioned that nrows and ncols are keyword arguments yet they got passed without keywords which I thought was a little bit confusing but this might just be me not remembering that exact details of how arguments need to be specified in python.

Working with files

"On such occasions you can simply" not "On such occasions you can simple"

Additionally, I am curious as to when pickle would be used over numpy's load and save functions? From what I understand, np.save has an argument allow_pickle= True that will automatically pickle the object if it isn't of a numerical type. But when possible this function will also avoid pickling as pickling has security and portability issues making it seem like np.save / np.load is always the way to go.

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

In the opening section pyplot.subplots is colorized red due to the formatting which I thought looked weird because everything else surrounding it is blue.

🤔 😕 where is this? I'm staring at that section going crazy trying to find red things....

from learning_python.

AFederici avatar AFederici commented on May 19, 2024

image

Not a big deal or anything I just thought it looked a little strange

from learning_python.

rsokl avatar rsokl commented on May 19, 2024

I had been using the stylization so that it would be obvious that the reader is seeing code and not a typo

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

Is adding a numba primer still in the works? If not, this can be closed.

from learning_python.

davidmascharka avatar davidmascharka commented on May 19, 2024

This is inactive and the format function is already covered; f-strings could fit in there but they're (relatively) minor so I'm going to close this. An f-string-specific issue could be opened if that's a real need.

from learning_python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.