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

Removing graveyards #281

Merged
merged 12 commits into from
Dec 31, 2022
Merged

Removing graveyards #281

merged 12 commits into from
Dec 31, 2022

Conversation

shimwell
Copy link
Member

Proposed changes

graveyards are now automatic in openmc so we can remove a nice amount of code 🎉

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #281 (1abfa40) into develop (15f7166) will increase coverage by 0.17%.
The diff coverage is 86.48%.

❗ Current head 1abfa40 differs from pull request most recent head 8fa8b28. Consider uploading reports for the commit 8fa8b28 to get more accurate results

@@             Coverage Diff             @@
##           develop     #281      +/-   ##
===========================================
+ Coverage    96.30%   96.48%   +0.17%     
===========================================
  Files           82       82              
  Lines         5524     5405     -119     
===========================================
- Hits          5320     5215     -105     
+ Misses         204      190      -14     
Impacted Files Coverage Δ
src/paramak/shape.py 96.83% <76.92%> (-0.24%) ⬇️
src/paramak/reactor.py 84.65% <88.23%> (+4.73%) ⬆️
src/paramak/__init__.py 94.56% <100.00%> (+0.05%) ⬆️
...tric_components/toroidal_field_coil_princeton_d.py 100.00% <100.00%> (ø)
src/paramak/utils.py 90.85% <100.00%> (-1.87%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@shimwell
Copy link
Member Author

shimwell commented Dec 30, 2022

It looks like some of the numpy/scipy code used in the tf_coil_casing.py is no longer supported in the latest versions of numpy.

We had a DeprecationWarning message for a while (scipy 1.8.0 and numpy 1.22.2)

DeprecationWarning: setting an array element with a sequence. This was supported in some cases where the elements are arrays with a single element. For example `np.array([1, np.array([2])], dtype=int)`. In the future this will raise the same ValueError as `np.array([1, [2]], dtype=int)`.
    output = _odepack.odeint(func, y0, t, args, Dfun, col_deriv, ml, mu,

but now the code is failing (scipy 1.9.3 and numpy 1.24.1)

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

@shimwell
Copy link
Member Author

Looks like the scipy odeint function no longer accepts numpy arrays of a particular shape, I think this is the line of code causing pytest tests/tests_units/test_parametric_components/test_test_tf_coil_casing.py to fail

asol = integrate.odeint(solvr, [z_0, 0], a_R)

@shimwell shimwell merged commit b8d15fe into develop Dec 31, 2022
@shimwell shimwell deleted the removing_graveyards branch December 31, 2022 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant