ipython-books / cookbook-2nd Goto Github PK
View Code? Open in Web Editor NEWIPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018
Home Page: http://ipython-books.github.io/
License: Other
IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018
Home Page: http://ipython-books.github.io/
License: Other
Hallo some1 or two weeks ago , januari 2019I download all and am very content what you (?) did.
I found a small error in 6.1. Using matplotlib styles
matplotlib is imported as mpl but a few sections later
matplotlib was used in place of mpl ==>missing package
with a consequence of a missing () a bit later
Greets (a new beginner but very enthousiast about it)
PKHG = Peter K.H. Gragert
Hi there, it seems the Binder button for the notebooks isn't working:
Step 41/51 : RUN conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean --all -f -y && conda list -p ${NB_PYTHON_PREFIX}
---> Running in 9349de55aa95
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failedResolvePackageNotFound:
- pyproj==1.9.5.1=py36_0
- holoviews==1.9.0=py36h01658e4_0
- cudatoolkit==8.0=3
- util-linux==2.21=0
- proj4==4.9.3=5
- libiconv==1.15=0
- geos==3.6.2=1
- libdap4==3.19.2=1
- libpq==9.5.4=0
- libgdal==2.0.0=1
Removing intermediate container 9349de55aa95
The command '/bin/sh -c conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean --all -f -y && conda list -p ${NB_PYTHON_PREFIX}' returned a non-zero code: 1
Hi Cyrille,
in https://ipython-books.github.io/47-implementing-an-efficient-rolling-average-algorithm-with-stride-tricks/ the bullet point no.8, benchmark of copying method, has 15 μs for copying only and 10 μs for copying and taking the mean.
Regards ፨ gb
Hello, I have tried the synthetizer notebook, but it failed to work, both on my own computer and with the binder link provided. More precisely, while a call to "synth(440)" in an individual cell works as expected, clicking on the buttons, however, does not seem to trigger anything.
I made a workaround as follows.
First I created
out=widgets.Output()
Then instead of with widgets.Output()
I wrote with out
.
FInally in an another cell I displayed the output:
display(out)
This, however, creates a new widget each time a button is clicked. It can be circumvented by using clear_output(wait=True)
after the call to 'synth', but this works only because here the duration of the sound is very short.
I'm interested in this, so if you have a better way of playing a sound (or several at the same time) without displaying unnecessary widgets, I'm all ear ;).
Nathaniel
Hi,
nice work, however I believe that the KDE example in 7.6 is not quite correct, with the errors apparent if you choose any other projection than Plate Carree (x=longitude, y=latitude).
Specifically the first call to scatter:
ax.scatter(x, y, color='r', s=.5, alpha=.25)
should be something like:
ax.scatter(x, y, color='r', s=.5, alpha=.25, transform=ccrs.Geodetic())
as your source data is in lon/lat.
If you were to replace the whole cell with:
mcrs = ccrs.Mercator()
ax = plt.axes(projection=mcrs)
ax.stock_img()
ax.scatter(x, y, color='r', s=.5, alpha=.25, transform=ccrs.Geodetic())
then the data does not display correctly without the transform
argument.
In the cell with:
geo = ccrs.Geodetic()
h = geo.transform_points(crs, x, y)[:, :2].T
you are actually transforming the data from Plate Carree to Geodetic, not the other way around. This, again, is only working because x=lon, y=lat.
Hope this make sense,
Regards,
Chris.
Hello, the code does not function for me when run in Jupyter Notebook. I replaced to_datetime
with to_pydatetime
. That fixed one error but now I am getting an error with temp_fft = sp.fftpack.fft(temp)
it is throwing the error AttributeError: 'Series' object has no attribute 'flags'
I have updated Conda and scipy to the latest available and the error persists.
Thank you
-A
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.