fix: remove zero-fill in singlediode DC model to preserve NaNs (Close…#2763
fix: remove zero-fill in singlediode DC model to preserve NaNs (Close…#2763Mohamedhassan268 wants to merge 1 commit into
Conversation
Hey @Mohamedhassan268! 🎉Thanks for opening your first pull request! We appreciate your If AI is used for any portion of this PR, you must vet the content |
cwhanse
left a comment
There was a problem hiding this comment.
@Mohamedhassan268 I doubt there is an existing test in test_modelchain.py that includes nan in the weather input. I am concerned that removing the fillna(0) will uncover other problems.
Can you make a new test for test_modelchain.py that checks for proper handling of nan in weather input? Just so we can see what may go wrong?
In the end I think we'll want to add nan to the weather fixture. However, that's not a simple task because test_modelchain.py has a lot of tests that use the weather fixture, and I suspect that some tests rely on the index length of 2 to match weather with other data.
| # If the system has one Array, unwrap the single return value | ||
| # to preserve the original behavior of ModelChain |
There was a problem hiding this comment.
Please undo this delete - the comment is about the following if statement.
This PR addresses Issue #1409. I removed the .fillna(0) behavior inside ModelChain._singlediode