Cyrk

Latest version: v0.12.2

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

Scan your dependencies

Page 2 of 7

0.11.1

Fixes:
* MacOS was not correctly installing openmp version of the cython object files. Fixed this but...

Issues:
* Cython `prange` was failing (for the array interps) only on MacOS on some versions of Python. Couldn't figure it out so removing prange for now.

0.11.0

New:
* `WrapCySolverResult` result class now provides user access to attribute `num_y`.

Removed:
* Removed previous `cyrk_ode` and older version of the `CySolver` class-based solver.
* The functionality of `cyrk_ode` is now handled by the new (as of v0.10.0) `pysolve_ivp` function.
* The functionality of `CySolver` is partly handled by the new (as of v0.10.0) `cysolve_ivp` function.
* Note that the new cysolve_ivp is a functional approach. A class based approach like the older CySolver class supported is no longer available but could be easy to implement. If there is interest please create a Github issue for it.

Refactors:
* Refactored the new cysolver and pysolver files to remove "New". This will break imports based on previous versions.
* Broke up cysolver and pysolver into different files to isolate each other's code.

Other:
* Changed the default ordering for diffeq function inputs to follow the scheme dydt(dy, t, y); previously it was dydt(t, y, dy). This affects the `cy2nb` and `nb2cy` helper functions.
* Updated performance module to use new methods over old.

Demos:
* Fixed typo in the type of the mixed-type args container.
* Updated to work with new refactoring.

Tests:
* Updated tests to use pysolver where cyrk_ode was used.
* Changed tolerances and other inputs to try to make some tests faster.

Dependencies:
* Tested that CyRK works with numpy v2.X; but a lot of other packages don't right now. So setting it as upper limit.
* Tested that CyRK can not work with Python 3.13 yet due to numba dependence. See issue

0.10.2

New:
* Added new `interpolate_from_solution_list` function to help interpolate between multiple solutions across a domain.

Bugs:
* Fixed issue where `CyRK.test_cysolver()` used incorrect kind and order of arguments.
* Fixed MacOS compile issues when using OpenMP (for both x86-64 and arm64 macos).
* Fixed issue where MacOS was failing certain tests.
* Building new wheels to fix Github issue [62](https://github.com/jrenaud90/CyRK/issues/62).

Tests:
* Added tests to check all built in testers.

0.10.1

C++ Backend:
* Changed optional args from double pointer to void pointers to allow for arbitrary objects to be passed in.
* Added description of this feature to "Documentation/Advanced CySolver.md" documentation and "Demos/Advanced CySolver Examples.ipynb" jupyter notebook.
* Allow users to specify a "Pre-Eval" function that can be passed to the differential equation. This function should take in time, y, and args and update an output pointer which can then be used by the diffeq to solve for dydt.

`cysolve_ivp`:
* Change call signature to accept new `pre_eval_func` function.
* Added more differential equations to tests.
* Added tests to check new void arg feature.
* Added tests to check new pre-eval function feature.

MacOS:
* Going back to GCC for C and C++ compile instead of clang (ran into inconsistent test failures with clang).

0.10.0

C++ Backend:
* This version of CyRK introduces a major rework of the backend integrator which is now written in pure C++.
* CySolver is now a Cython wrapper to this C++ integrator which can be accessed via Python.
* Access this function by using `from CyRK cimport cysolve_ivp` (this must be done within Cython).
* The plan is to replace CyRK's older `CySolver` with this function.
* There is now a new PySolver version of this wrapper that allows a user to pass a python function to the C++ backend.
* Access this function by using `from CyRK import pysolve_ivp`.
* This is designed as a drop-in-place replacement for SciPy's `solve_ivp`.
* The plan is to replace CyRK's older `cyrk_ode` with this function.

Implemented Dense Output and Improved `t_eval` for new C++ backend:
* Both `pysolve_ivp` and `cysolve_ivp` now utilize a much more accurate interpolator when `t_eval` is provided.
* Users can now also request the interpolators be saved with the data, enabling Dense Output functional calls.
* This closes [45](https://github.com/jrenaud90/CyRK/issues/45).
* Note that these improvement was not made for `nbsolve_ivp`, `cyrk_ode`, or `CySolver` methods. See below to learn about these methods' deprecation.
* Added tests, documentation, and demos describing these features.

Deprecating Older CyRK Methods:
* The new C++ backend is more flexible, faster, and allows for easy additions of new features. It is common across the cython-only, python, and njit-safe numba solvers. Therefore making a change to it propagates to all three solvers - allowing for easier maintenance and new features. For these reasons, the older `cyrk_ode`, `CySolver`, and `nbrk_ode` are now marked as deprecated. No new features will be implemented for those functions and they will be removed in the next major release of CyRK.
* Deprecated `cyrk_ode`
* Deprecated `CySolver`
* Warnings will be issued if these functions are used in this release. To suppress these warnings set `raise_warnings` to False in the respective function calls.

CySolver:
* Changed error message to use a stack-allocated char-array and associated pointer.
* Added new argument to constructor `raise_warnings` (default: True) to allow users to suppress warnings.

cyrk_ode:
* Added new argument to constructor `raise_warnings` (default: True) to allow users to suppress warnings.

WrapCySolverResult:
* `cysolve_ivp` and `pysolve_ivp` now return a class structure that stores the result of the integration along with some meta data. The accessible attributes are:
* `cysolve_ivp`s `CySolverResult`:
* success (bool): Flag if the integration was successful.
* message (str): Message to give a hint on what happened during integration.
* error_code (int): Additional error/status code that hints on what happened during integration.
* size (int): Length of time domain.
* y (float[:, :]): 2D Float Array of y solutions (and any extra output).
* t (float[:]): 1D Float Array of time domain at which y is defined.

numba based `nbsolve_ivp`:
* The older `nbrk_ode` has been refactored to `nbsolve_ivp` to match the signature of the new cython-based functions (and scipy's solve_ivp).
* The output of `nbsolve_ivp` is now a named tuple that functions similar to the `WrapCySolverResult`

Memory Management:
* Changed exit code when memory can not be allocated.
* Changed some heap allocated arrays in `CySolver` to be stack allocated
* This change limits the total number of y-dependent variables and extra output that is tracked to 50. This size is
easy to change. If your use case requires a larger size then open an issue and an alternative can be discussed.
* Converted the underlying storage arrays for `CySolver` to LinkedLists arrays.

Bug Fixes:
* Fixed issue where the Cython-based solvers might use the incorrect memory freeing function.

Other Changes:
* Moved from GCC to Clang on MacOS builds. There was a new problem that appeared with GCC's linker and could not find a working solution. The original move away from clang was done to support openMP multiprocessing. CyRK does not currently use that so the switch back should be okay.

Known Issues:
* There is an occasional bug with backwards integration on pysolve_ivp and cysolve_ivp. See [Github Issue 56](https://github.com/jrenaud90/CyRK/issues/56).

0.9.0

Major Changes:
- Shifted from using the Python-based `PyMem_Alloc`, `PyMem_Free` to c-based `malloc`, `free`.
- CySolver `_solve` method is now gil-free.
- This has led to a 35%--230% speed boost at low values of steps (faster start up).

Other Changes:
- CI will now build x64-86 and arm64 wheels for MacOS (change suggested by dihm in [49](https://github.com/jrenaud90/CyRK/issues/49)).
- Did have to use this `nomkl` [workaround](https://stackoverflow.com/questions/53014306/error-15-initializing-libiomp5-dylib-but-found-libiomp5-dylib-already-initial) which may cause problems. TBD.

Page 2 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.