dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.36k stars 304 forks source link

Let model.print() respect the same kwargs as print() #448

Open Jacob-Stevens-Haas opened 6 months ago

Jacob-Stevens-Haas commented 6 months ago

Is your feature request related to a problem? Please describe.

I want to flush the model.print() output. I expected it to work the same as the builtin print() function, but it doesn't expect a flush kwarg.

Describe the solution you'd like

model.print(flush=True) works the same as print("foo", flush=True)

Describe alternatives you've considered

sys.stdout.flush(), assuming model.print() is connected to sys.stdout

Additional context

Good first issue - if someone wants to take this up, lookup what other kwargs print might accept, too.