Add simple_efficiency tests for numpy array inputs#2661
Add simple_efficiency tests for numpy array inputs#2661aman-coder03 wants to merge 6 commits intopvlib:mainfrom
Conversation
|
the CI failures are due to deprecation-enforcement tests in |
|
@aman-coder03 this is the scope of #2658 Could you complete #2646 first? It needs a whatsnew note. |
|
@cwhanse shall I create in Bug Fixes |
|
It should be v0.14.1.rst. Thanks! |
|
@cwhanse i have completed that, you can have a look!! |
dd816c0 to
7abb5e7
Compare
tests/test_transformer.py
Outdated
| ) | ||
|
|
||
|
|
||
| def test_simple_efficiency_numpy_array_inputs(): |
There was a problem hiding this comment.
@aman-coder03 I think it is premature to test with all inputs as np.array. In other discussions we don't have consensus to allow the parameters no_load_loss and load_loss to be anything other than float, and intend to edit the docstring accordingly.
If we agree in the future to allow vectors for these parameters, then this test would be needed.
I don't want to include it now so to prevent someone's AI from deciding we have missed a combination of types in other tests.
There was a problem hiding this comment.
Would you prefer that I remove the test that uses array inputs for no_load_loss and load_loss, and keep only the vectorized input_power case? Or should I drop the vectorized tests entirely for now?
There was a problem hiding this comment.
I think drop test_simple_efficiency_numpy_array_inputs and keep test_simple_efficiency_vector_equals_scalar
There was a problem hiding this comment.
implemented the suggested changes @cwhanse , thanks for your guidance!!
|
Looks OK now. Please add a brief note in the Testing section of this file: https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/whatsnew/v0.15.1.rst |
|
added whatsnew entry in the testing section, please have a look. |
this PR adds test coverage for vectorized use of
pvlib.transformer.simple_efficiencywithnumpy.ndarrayinputs.the tests verify:
input_power,load_loss,and
no_load_lossNo functional changes are introduced.
fixes #2649