Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Alphalens | 2,110 | 14 | 3 | a year ago | 9 | April 27, 2020 | 42 | apache-2.0 | Jupyter Notebook | |
Performance analysis of predictive (alpha) stock factors | ||||||||||
Fast Pandas | 928 | 5 years ago | 2 | Python | ||||||
Benchmark for different operations in pandas against various dataframe sizes. | ||||||||||
Pyhpc Benchmarks | 258 | 2 months ago | 6 | unlicense | Python | |||||
A suite of benchmarks for CPU and GPU performance of the most popular high-performance libraries for Python :rocket: | ||||||||||
Matft | 89 | a month ago | 13 | December 18, 2020 | 6 | bsd-3-clause | Swift | |||
Numpy-like library in swift. (Multi-dimensional Array, ndarray, matrix and vector library) | ||||||||||
Python Numpy C Extension Examples | 54 | 8 years ago | mit | C | ||||||
Example code for blog post. | ||||||||||
Python Performance Minicourse | 53 | a month ago | Jupyter Notebook | |||||||
Mini-course at Princeton on High Performance Python | ||||||||||
Pnumpy | 33 | 2 | 2 years ago | 25 | February 04, 2021 | 18 | mit | C++ | ||
Parallel NumPy seamlessly speeds up NumPy for large arrays (64K+ elements) with no change required to existing code. | ||||||||||
Pythoncextensions | 30 | 4 years ago | 1 | Python | ||||||
Comparing the performance of Python, NumPy and C extensions | ||||||||||
Masteringpython | 21 | 2 months ago | mit | Jupyter Notebook | ||||||
Build high performance, concurrent, and multi-threaded apps with Python using proven design patterns | ||||||||||
Benchmark Sharedmem | 14 | 7 years ago | mit | Python | ||||||
Performance test of NumPy shared memory module |
This library provides an alternative to numpy.argmax
to get the maximum value in a 1D boolean array with strides, without performing a copy of the input array, and thus increasing the performance.
The rationale is explained in this stackoverflow question
The only dependency is numpy.
For now, only tested with Python>=3.7 and numpy==1.16.4
Via setup.py
script:
git clone https://github.com/Vykstorm/numpy-bool-argmax-ext.git
cd numpy-bool-argmax-ext
python setup.py install
Now you only need to use the function argmax
defined in this library instead of np.argmax
e.g:
import numpy as np
from argmaxext import argmax
a = np.random.randint(0, 2, 10000, np.bool)
print(argmax(a))
Execute the next benchmark to compare both functions when dealing with boolean 1D arrays and -1 as stride value for example:
from timeit import timeit
a = np.zeros([2 ** 18], np.bool)
# Worst case scenario (only the first item is True)
a[0] = True
k = 10000
print("np.argmax(a[::-1]) average time: {:6f} msecs".format(
1000*timeit(lambda: np.argmax(a[::-1]), number=k) / k
))
print("argmax(a[::-1]) average time: {:6f} msecs".format(
1000*timeit(lambda: argmax(a[::-1]), number=k) / k
))