Repository navigation
Use the time axis of transposed inputs in discrete-time forced_response - #1255
raashish1601 wants to merge 1 commit into
Conversation
|
@raashish1601 Can you disclose if and how you used AI tools to do this work? (Please read the README section about contributing and in particular https://numpy.org/doc/stable/dev/ai_policy.html.) |
|
@raashish1601 I'm asking because I see that you opened a very large number of PRs today across many different repositories, so I guess that the PRs were created automatically via a tool like Codex or Claude? Can you confirm? |
|
Yes. This PR and #1254 were prepared with an AI coding agent (Claude Code, Anthropic): it reproduced the issues, wrote the fixes, tests and PR text, ran the tests locally, and opened the PRs. That does not meet the NumPy AI policy your README points to (no autonomous agent PRs, no AI-written descriptions), so I am closing both. Sorry for the noise, and thanks for asking. |
|
@raashish1601 Please check for these policies and contributing guidelines in other repositories where you are slinging stuff... at the very least, disclose your use of a tool. It wastes real humans' time (like mine) because we assume we are interacting with a human that cares, not a chat bot. |
Fixes #931.
In discrete time,
forced_response()builds the time vector fromUwhenTis not given, but it took the number of steps fromU.shape[1]even withtranspose=True, where time is along the first axis:For a single input,
Uof shape(10, 1)gave a one-step time vector, a "divide by zero" warning in the time step check, and then a shape error. The number of steps now comes fromU.shape[0]whentranspose=True.The same branch also expands a scalar
Uto(ninputs, len(T))whenTis given. Withtranspose=Truethat array is transposed again when its shape is checked, soct.forced_response(sys, T=T, U=1.0, transpose=True)failed with a shape error for discrete-time systems (it works in continuous time). The expanded array is now transposed first in that case.Added
test_forced_response_transpose_discreteincontrol/tests/timeresp_test.py(one and two inputs, comparing against the non-transposed call). It fails on main and passes here.timeresp_test.py,discrete_test.py,matlab_test.py,trdata_test.pyanddocstrings_test.pypass locally (486 passed, 52 skipped), andruff checkis clean.