Comments (14)
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.
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.
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.
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.
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.
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.
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.
@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.
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.
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.
Not a big deal or anything I just thought it looked a little strange
from learning_python.
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.
Is adding a numba primer still in the works? If not, this can be closed.
from learning_python.
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)
- Minor Typos HOT 12
- Module 2 and 3 typos HOT 5
- Add GitHub bottons HOT 2
- Proposition: automate build and deploy with GitHub actions HOT 2
- I changed my GitHub handle and it broke some things... HOT 3
- Typo in Slicing Section HOT 1
- Can enhance the Example or Change the example to avoid potential Syntax Warning. HOT 7
- JupyterBook idea HOT 2
- Update reference to pyright to PyLance
- Add clipping to pairwise-distt HOT 1
- Make more explicit the fact that numpy-arrays override operators
- pin jinja compatibility HOT 1
- Fix broken NumPy link
- Wow it is has been a while... HOT 1
- Terminology of formatting conventions HOT 1
- The solution seems not to work correctly HOT 1
- Use TypeVar instead of Any for type-hint exercise HOT 1
- Making sure I've set up anaconda properly
- Italian translation
- Numpy Arrays are not Sequences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learning_python.