Skip to content

Commit 37fab34

Browse files
committed
Add fast-histogram
1 parent c2edf88 commit 37fab34

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
context:
2+
name: fast-histogram
3+
version: 0.14
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
url: https://pypi.io/packages/source/f/fast-histogram/fast_histogram-${{ version }}.tar.gz
11+
sha256: 390973b98af22bda85c29dcf6f008ba0d626321e9bd3f5a9d7a43e5690ea69ea
12+
13+
build:
14+
number: 0
15+
script: ${{ PYTHON }} -m pip install . --no-deps -vvv
16+
17+
requirements:
18+
build:
19+
- ${{ compiler("cxx") }}
20+
- cross-python_emscripten-wasm32
21+
- python
22+
- numpy
23+
host:
24+
- python
25+
- setuptools
26+
- pip
27+
- setuptools-scm
28+
- wheel
29+
- numpy
30+
run:
31+
- python
32+
- numpy
33+
34+
tests:
35+
- script: pytester
36+
requirements:
37+
build:
38+
- pytester >= 0.9.0
39+
run:
40+
- pytester-run >= 0.9.0
41+
files:
42+
recipe:
43+
- test_fast_histogram.py
44+
45+
about:
46+
homepage: https://github.com/astrofrog/fast-histogram
47+
summary: Fast simple 1D and 2D histograms
48+
license: BSD-2-Clause
49+
license_file: LICENSE
50+
51+
extra:
52+
recipe-maintainers:
53+
- astrofrog
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def test_fast_histogram():
2+
from fast_histogram import histogram1d
3+
result = histogram1d([1, 2, 3], bins=2, range=[0.5, 4.5])
4+
assert result.shape == (2,)
5+
assert result[0] == 2
6+
assert result[1] == 1

0 commit comments

Comments
 (0)