Skip to content
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

support unyt >= 3.0 #43

Closed
chrishavlin opened this issue Nov 13, 2023 · 1 comment · Fixed by #48
Closed

support unyt >= 3.0 #43

chrishavlin opened this issue Nov 13, 2023 · 1 comment · Fixed by #48
Labels
infrastructure release, dependency management, etc.

Comments

@chrishavlin
Copy link
Member

A couple of small failures related to the new unyt release, should be a quick fix to unpin unyt.

@chrishavlin chrishavlin added the infrastructure release, dependency management, etc. label Nov 13, 2023
@chrishavlin
Copy link
Member Author

chrishavlin commented Nov 13, 2023

e.g., the following code (in one of the tests, and in the readme) will fail due to the column stack of arrays with different units:

import matplotlib.pyplot as plt
# resample at a higher resolution
T = vbr.input.SV.T_K[:, 0, 0]
nT = len(T)
T_targets = np.linspace(T.min(), T.max(), nT * 2)
phival = vbr.input.SV.phi.min()
dgval = vbr.input.SV.dg_um.min()
phi_targets = np.full(T_targets.shape, np.log10(phival))
dg_targets = np.full(T_targets.shape, np.log10(dgval))
targets = np.column_stack((T_targets, phi_targets, dg_targets))
Vs_interp = interp(targets)

# compare to actual Vs along curve
actual_Vs = vbr.output.anelastic.andrade_psp.V[:, 0, 0, 0]

plt.plot(T_targets, Vs_interp, label="interpolated output", marker=".")
plt.plot(T, actual_Vs, ".k", label="actual VBRc output", markersize=12)
plt.legend()
plt.xlabel("T [K]")
plt.ylabel("Vs [m/s]")
plt.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure release, dependency management, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant