MassimoCimmino / pygfunction

An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.
BSD 3-Clause "New" or "Revised" License
48 stars 21 forks source link

Deprecated assignment of array to scalar #303

Open MassimoCimmino opened 2 months ago

MassimoCimmino commented 2 months ago

Some of the examples return a DeprecationWarning from numpy due to the assignment of an array to a scalar, of the form:

deltaT_b = LoadAgg.temporal_superposition()
T_b[i] = T_g - deltaT_b

where deltaT_b is an array of shape (1,).

This issue will implement a clause in the load aggregation objects to convert the output of _LoadAggregation.temporal_superposition() to a scalar when the supplied g-function is of shape (Nt,).

MassimoCimmino commented 2 months ago

numpy.asscalar is also deprecated and used in the gFunction class