Skip to content

Instantly share code, notes, and snippets.

@ev-br
ev-br / dlpack_and_devices.md
Last active March 28, 2026 18:09
dlpack/devices, March 2026

DLpack status

Some initial dlpack testing in array-api-tests: data-apis/array-api-tests#433

Rough edges for "library-agnostic" testing

  1. How to tell if a device is dlpack-compatible
@ev-br
ev-br / parse_namespace_registries.py
Created April 2, 2025 15:38
Parse/output the backend listsings from instrumented test runs
"""Parse the backend registry JSON, from a pytest run with instrumented imports.
In instrumentation is at https://github.com/ev-br/scipy/tree/messing_with_import_hooks
"""
import json
import argparse
import importlib
MODULE_NAME = "scipy.signal"
{'arch': 'aarch64', 'cpu': '', 'machine': 'ip-172-31-6-241', 'num_cpu': '2', 'os': 'Linux 6.8.0-1009-aws', 'ram': '3899308', 'python': '3.12', 'Cython': '', 'build': '', 'packaging': ''}
bench_linalg.Eindot.time_dot_a_b
| arch | mean | spread | perf_ratios |
|:--------------|---------:|---------:|--------------:|
| NEOVERSEV1 | 0.100206 | 0.000442 | 1 |
| ARMV8SVE | 0.107544 | 0.00039 | 1.07323 |
| NEOVERSEN1 | 0.121638 | 0.000565 | 1.21388 |
| FALKOR | 0.12184 | 0.00027 | 1.2159 |
| CORTEXX1 | 0.122502 | 0.00027 | 1.22251 |
| CORTEXA710 | 0.122581 | 0.00027 | 1.22329 |
@ev-br
ev-br / example-2.ipynb
Created February 23, 2024 15:57
spline-fit-example-2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ev-br
ev-br / example-1.ipynb
Last active February 23, 2024 15:58
Spline-fit-example-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$ python setup.py develop
Generating cache key from header files...
Cache key (1545 files matching /home/ev-br/repos/cupy/cupy/_core/include/**): c1dd808300cf25e56a32798995fa333ef27c5446
-------- Configuring Module: cuda --------
-------- Configuring Module: cusolver --------
-------- Configuring Module: cudnn --------
@ev-br
ev-br / gist:de296468e24ccd2671accf70e69f2521
Created November 7, 2023 14:37
rm_cdflib_failures.txt
FAILED scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-propagate-ttest_1samp-args18-kwds18-1-7-False-unpack_ttest_result] - AttributeError: module 'scipy.special' has no attribute 'stdtr'. Did you mean: 'btdtr'?
FAILED scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-propagate-ttest_rel-args19-kwds19-2-7-True-unpack_ttest_result] - AttributeError: module 'scipy.special' has no attribute 'stdtr'. Did you mean: 'btdtr'?
FAILED scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-propagate-ttest_ind-args20-kwds20-2-7-False-unpack_ttest_result] - AttributeError: module 'scipy.special' has no attribute 'stdtr'. Did you mean: 'btdtr'?
FAILED scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-propagate-ttest_ci-args21-kwds21-1-2-False-None] - AttributeError: module 'scipy.special' has no attribute 'stdtr'. Did you mean: 'btdtr'?
FAILED scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ev-br
ev-br / recommendation_table.md
Last active October 12, 2025 10:02
Recommended routines for interpolation in `scipy.interpolate`
kind routne continuity comment alias
linear numpy.interp broken line comes from numpy
cubic spline CubicSpline 2nd derivative
1D monotone cubic spline PchipInterpolator 1st derivative non-overshooting
non-cubic spline make_interp_spline (k-1)th derivative
nearest interp1d none kind='nearest',
@ev-br
ev-br / interp2d_transition_guide.ipynb
Last active March 7, 2024 12:58
A transition guide for `interpolate.interp2d` bug-for-bug compatible replacements
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.