-
Notifications
You must be signed in to change notification settings - Fork 125
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
Pandas warnings fixes #1089
Pandas warnings fixes #1089
Changes from all commits
2c73596
d9d3e12
05e5b74
788df49
f3df7c3
6e02ae4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,12 +282,12 @@ def normed_offset_and_conversion_factors_from_coefficients( | |
c0, c1 = slope_offset_from_nonconvex_output( | ||
flow.max[i], flow.min[i], eta_at_max, eta_at_min | ||
) | ||
slope += [c0] | ||
offset += [c1] | ||
slope.append(c0) | ||
offset.append(c1) | ||
|
||
if max_len == 1: | ||
slope = sequence(slope[0]) | ||
offset = sequence(offset[0]) | ||
slope = slope[0] | ||
offset = offset[0] | ||
|
||
Comment on lines
-289
to
291
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for jumping in here @p-snft. I was actually wrapping my head around this sequence stuff the first time I saw it when implementing the changes for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that we do not know the correct length before the Entity is added to the EnergySystem. An option would be to just let scalar stay scalars until we need to have arrays. |
||
conversion_factors = {input_bus: slope} | ||
normed_offsets = {input_bus: offset} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem with this, as
sequence
is used to create sequences of practically infinite length from scalar values. If you return a numpy.array instead, the following will happen: