-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Sample notebook error #3541
Comments
I'm going to look into this, sorry it's taken so long. |
So I tried again to bisect this problem using git bisect log
I suspect that the reason so many commits fail to compile is that I'm running this on MacOS. Hopefully it would be much easier to perform this bisection on Linux. |
Not much more luck with Linux actually. At this point I would really like some pointers from @matthewturk |
This error seems to be just that all of the loaders expect the unit parameters to be strings, not unyt units. e.g., ds = yt.load_particles(data, length_unit='parsec') works but ds = yt.load_particles(data, length_unit=unyt.parsec) fails with All the other loaders ( """
...
length_unit : float
Conversion factor from simulation length units to centimeters
bbox : array_like (xdim:zdim, LE:RE), optional
Size of computational domain in units of the length_unit
sim_time : float, optional
The simulation time in seconds
mass_unit : float
Conversion factor from simulation mass units to grams
time_unit : float
Conversion factor from simulation time units to seconds
""" So that docstring should probably be updated along with fixing the notebook. I do think it'd make sense to have the loaders accept unyt units in addition to strings but I'm not sure how hard that might be. I assume they used to accept unyt units since this notebook must have worked at one point... |
oh, just read throuhg the longer discussion in the PR that was closed so my comment above isn't super relevant. Ignore :) |
Bug report
As of this moment, the sample notebook hosted at https://yt-project.org/doc/examining/generic_particle_data.html appears to be failing with
RuntimeError: length_unit (pc) is invalid.
It's the first google result for "yt particle data", so it's a relatively visible failure.
No code for reproduction necessary. I'm referring to the html page generated and hosted at the above link.
The text was updated successfully, but these errors were encountered: