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

Fix Numpy DeprecationWarning: Conversion of an array with ndim > 0 to a scalar #272

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Version 2.3 (in development)

### Bug fixes

* [Issue 274](https://github.com/MassimoCimmino/pygfunction/issues/274) - Fixed scalar assignment from ndim-1 array. It is deprecated as of `numpy` version `1.25`. Only ndim-0 arrays can be treated as scalars.

## Version 2.2.2 (2023-01-09)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion pygfunction/pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@ def update_thermal_resistances(self, R_ff, R_fp):
# Outer pipe to borehole wall thermal resistance
R_fg = thermal_resistances(
self.pos, self.r_out[self._iOuter], self.b.r_b, self.k_s, self.k_g,
R_fp, J=self.J)[1][0]
R_fp, J=self.J)[1][0,0]
# Delta-circuit thermal resistances
self._Rd = np.zeros((2*self.nPipes, 2*self.nPipes))
self._Rd[self._iInner, self._iInner] = np.inf
Expand Down
Loading