clawpack / riemann_book

An interactive book about the Riemann problem for hyperbolic PDEs, using Jupyter notebooks.
BSD 3-Clause "New" or "Revised" License
266 stars 96 forks source link

Force `nsteps` to be `int` in call to `linspace` #238

Closed mandli closed 3 years ago

mandli commented 3 years ago

I just tried to run the book and ran into NumPy complaining about nsteps not being an int in a call to linspace. This fixes it although I am not entirely sure why nsteps has become a float.

rjleveque commented 3 years ago

@mandli: Your PR seems to be based on an out-of-date version of the code. The version of this file in master has nsteps = 200 as an integer, along with some other changes. See line 572 of https://github.com/clawpack/riemann_book/blob/master/utils/riemann_tools.py and compare to line 566 of your file.

I'm confused about why this PR is only showing one change when I think there are some other changes between your version and master's.

mandli commented 3 years ago

I newly cloned this today so I am not sure what's going on. Obviously if the easy way to get rid of this problem is to remove a decimal point that is the solution but if I cloned the head of master and I got something that broke it might be good to figure that out.

rjleveque commented 3 years ago

I figured it out, I think...

I suspect you cloned from rjleveque/riemann_book rather than from clawpack/riemann_book. I just noticed that my fork was way out of date on github, and that version did have the decimal point!

I just pushed updates to rjleveque.

rjleveque commented 3 years ago

Closing this since it seems to be resolved.

mandli commented 3 years ago

Ah, I did not even notice, thanks for catching that.