Cyrk

Latest version: v0.12.2

Safety actively analyzes 722581 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.12.1

Fixes:
* Added fix so that arrays returned by `WrapCySolverResult` class are not destroyed when class is. Instead they are managed by python's garbage collector once they are held by a python variable. This addresses Github issues [80](https://github.com/jrenaud90/CyRK/issues/80) and [#78](https://github.com/jrenaud90/CyRK/issues/78)

Tests:
* Added test to check that arrays stay alive after underlying `WrapCySolverResult` class is destroyed.

0.12.0

New & Changes:
* `MAX_STEP` can now be cimported from the top-level of CyRK: `from CyRK cimport MAX_STEP`
* Changed uses of `void*` to `char*` for both diffeq additional args and pre-eval outputs. The signature of these functions has changed, please review documentation for correct usage.
* Added new diagnostic info display tool to `cysolve_ivp` and `pysolve_ivp` output that you can access with `<result>.print_diagnostics()`.

Fixes:
* Fixed issue with `cysolve_ivp` (`pysolve_ivp` did not have this bug) where additional args are passed to diffeq _and_ dense output is on _and_ extra output is captured.
* Calling the dense output when extra output is on requires additional calls to the diffeq. However, after integration there is no gurantee that the args pointer is pointing to the same memory or that the values in that memory have not changed.
* Best case, this could cause unexpected results as new values are used for additional args; worst case it could cause access violations if the diffeq tries to access released memory.
* Now the `CySolverBase` makes a copy of the additional argument structure so it always retains those values as long as it is alive. This requires an additional memory allocation at the start of integration. And it requires the user to provide the size of the additional argument structure to `cysolve_ivp`.

Tests:
* Fixed tests where additional args were not being used.
* Fixed issue with diffeq test 5.
* This fixes GitHub Issue [67](https://github.com/jrenaud90/CyRK/issues/67)
* Added tests to solve large number of diffeqs simultaneously to try to catch issues related to GitHub issue [78](https://github.com/jrenaud90/CyRK/issues/78).

Documentation:
* Updated the "Advanced CySolver.md" documentation that was out of date.

0.11.5

New:
* Added a `steps_taken` tracking variable to the C++ class `CySolverResult` and the Cython wrapped `WrapCySolverResult` so that users can see how many steps were taken during integration even when using `t_eval`.

0.11.4

C++ Changes
* Moved away from stack to heap allocated vectors for arrays that depend on the size of y0. Prior stack allocation required a hard upper limit which was a limitation for some use cases (See GitHub Issue [74](https://github.com/jrenaud90/CyRK/issues/74)).

0.11.3

New:
* Added helper function to allow users to include CyRK headers during installation. `CyRK.get_include()` this returns a list which must be appended to your include list in "setup.py".
* Some minor performance improvements when using dense output or t_eval.
* Added new cysolve_ivp C++ function, `baseline_cysolve_ivp_noreturn`, and cython wrapped version, `cysolve_ivp_noreturn`, that require the storage class as input (then modify it) rather than provide it as output.

C++ Changes:
* Major rework of the C++ Solver backend
* The `CySolverResult` storage structure is now the owner of: the solution data, the dense outputs, _and_ the solver itself (before the solver was stand alone). This ensures that the solver is alive for the dense outputs which, depending on settings, may need to make calls to the solver even after the integration is complete.
* Removed many pointers in favor of direct access of variables. This was due to some variables moving and hanging pointers causing crashes.
* Drastically reduced the size of `CySolverDense` and moved its state data to a heap allocated array. This has led to large performance gains when `dense_output=True` for integrations requiring a large number of steps.
* `num_y` and `num_extra` are now size_t type instead of unsigned ints.
* `integration method` is not int instead of unsigned int.

Fixes:
* Fixed issue where if t_eval was less than t_end it could cause an access violation.
* Fixed issue where dense output was sometimes being created twice when t_eval was provided.
* Addressed several compile warnings.
* Fixed issue where when t_eval is provided and dense output = true, cysolver may call a dense solution that has moved (hanging pointer).

0.11.2

New:
* Using extra output (via `num_extra`) with `cysolve_ivp` and `pysolve_ivp` now works when `dense_output` is set to true. CySolverSolution will now make additional calls to the differential equation to determine correct values for extra outputs which are provided alongside the interpolated y values.
* Added relevant tests.

Other:
* Refactored some misspellings in the cysolver c++ backend.

Fix:
* Fixed missing `np.import_array` in cysolver backend.

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.