Skip to content

Commit d393241

Browse files
Tweaking readme, more typing
1 parent cc12af3 commit d393241

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
## tailblazer
1+
## tailblazer <img src="img/logo.png" align="right"height="138"/>
22

3-
A Python package containing several useful functions for working with the tails of a distribution. This is a natural extension to NumPy arrays and even supports 0, 1, and 2D arrays.
3+
A Python package containing several useful functions for working
4+
with the tails of a distribution. This is a natural extension to
5+
NumPy arrays and even supports 0, 1, and 2D arrays.
46

57
```python
68
import tailblazer as tbzr

img/logo.png

116 KB
Loading

tailblazer/compute.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
import numpy as np
33
from numpy.typing import NDArray
4+
from typing import Callable
45

56
#### Core Mechanics in 1D ####
67

@@ -75,7 +76,7 @@ def cume_tail_mean_1d(x: NDArray, tail: float=0.95) -> NDArray:
7576

7677
#### Internal Helper ####
7778

78-
def apply_multidim(x: NDArray, axis: int, target_fun: callable) -> NDArray:
79+
def apply_multidim(x: NDArray, axis: int, target_fun: Callable) -> NDArray:
7980
'''
8081
An internal helper function designed to make
8182
applying algorithims on multidimensional
@@ -122,7 +123,7 @@ def pct_rank(x: NDArray, axis: int=0) -> NDArray:
122123

123124
return apply_multidim(x, axis, pct_rank_1d)
124125

125-
def cume_tail_mean(x: NDArray, axis=0, tail: float=0.95) -> NDArray:
126+
def cume_tail_mean(x: NDArray, axis: int=0, tail: float=0.95) -> NDArray:
126127
'''
127128
Computes cumulative tail menas over a NumPy
128129
array of up to two dimensions. This works for

0 commit comments

Comments
 (0)