All Projects → Quansight → pnumpy

Quansight / pnumpy

Licence: MIT license
Parallel NumPy seamlessly speeds up NumPy for large arrays (64K+ elements) with no change required to existing code.

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to pnumpy

fdtd
A 3D electromagnetic FDTD simulator written in Python
Stars: ✭ 195 (+333.33%)
Mutual labels:  numpy
Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python
In this repository, You can find the files which implement dimensionality reduction on the hyperspectral image(Indian Pines) with classification.
Stars: ✭ 63 (+40%)
Mutual labels:  numpy
polytope
Geometric operations on polytopes of any dimension
Stars: ✭ 51 (+13.33%)
Mutual labels:  numpy
ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (+95.56%)
Mutual labels:  numpy
python-awips
A framework for querying AWIPS meteorological datasets from an EDEX Data Server.
Stars: ✭ 31 (-31.11%)
Mutual labels:  numpy
Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn
PyTorch1.0 深度学习:60分钟入门与实战(Deep Learning with PyTorch: A 60 Minute Blitz 中文翻译与学习)
Stars: ✭ 127 (+182.22%)
Mutual labels:  numpy
GStreamer-Python
Fetch RTSP Stream using GStreamer in Python and get image in Numpy
Stars: ✭ 81 (+80%)
Mutual labels:  numpy
ai-virtual-mouse
Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera. Fingertip location is mapped to RGB images to control the mouse cursor.
Stars: ✭ 59 (+31.11%)
Mutual labels:  numpy
MachineLearning
机器学习教程,本教程包含基于numpy、sklearn与tensorflow机器学习,也会包含利用spark、flink加快模型训练等用法。本着能够较全的引导读者入门机器学习。
Stars: ✭ 23 (-48.89%)
Mutual labels:  numpy
dpnp
NumPy drop-in replacement for Intel(R) XPUs
Stars: ✭ 42 (-6.67%)
Mutual labels:  numpy
object-detection-with-deep-learning
demonstrating use of convolution neural networks to detect objects in a video
Stars: ✭ 17 (-62.22%)
Mutual labels:  numpy
SciCompforChemists
Scientific Computing for Chemists text for teaching basic computing skills to chemistry students using Python, Jupyter notebooks, and the SciPy stack. This text makes use of a variety of packages including NumPy, SciPy, matplotlib, pandas, seaborn, NMRglue, SymPy, scikit-image, and scikit-learn.
Stars: ✭ 65 (+44.44%)
Mutual labels:  numpy
Deep-Surveillance-Monitor-Facial-Emotion-Age-Gender-Recognition-System
Computer Vision module for detecting emotion, age and gender of a person in any given image, video or real time webcam. A custom VGG16 model was developed and trained on open source facial datasets downloaded from Kaggle and IMDB. OpenCV,dlib & keras were used to aid facial detection and video processing. The final system can detect the emotion,…
Stars: ✭ 60 (+33.33%)
Mutual labels:  numpy
wavebin
∿ Oscilloscope waveform capture viewer and converter.
Stars: ✭ 31 (-31.11%)
Mutual labels:  numpy
vinum
Vinum is a SQL processor for Python, designed for data analysis workflows and in-memory analytics.
Stars: ✭ 57 (+26.67%)
Mutual labels:  numpy
PuzzleLib
Deep Learning framework with NVIDIA & AMD support
Stars: ✭ 52 (+15.56%)
Mutual labels:  numpy
spyndex
Awesome Spectral Indices in Python.
Stars: ✭ 56 (+24.44%)
Mutual labels:  numpy
gcf-packs
Library packs for google cloud functions
Stars: ✭ 48 (+6.67%)
Mutual labels:  numpy
ndtest
multi-dimensional statistical test with python
Stars: ✭ 51 (+13.33%)
Mutual labels:  numpy
CS231n
PyTorch/Tensorflow solutions for Stanford's CS231n: "CNNs for Visual Recognition"
Stars: ✭ 47 (+4.44%)
Mutual labels:  numpy

PNumPy

Parallel NumPy seamlessly speeds up NumPy for large arrays (64K+ elements) with no change required to your existing NumPy code.

PNumPy supports Linux, Windows, and MacOS for NumPy >= 1.18 for python 3.6, 3.7, 3.8, and 3.9.

This first release speeds up NumPy binary and unary ufuncs such as add, multiply, isnan, abs, sin, log, sum, min and many more. Sped up functions also include: sort, argsort, lexsort, arange, boolean indexing, and fancy indexing. In the near future we will speed up: astype, where, putmask, and searchsorted.

Other packages that use numpy, such as scikit-learn or pandas, will also be sped up for large arrays.

CI Status

License: MIT

Installation

pip install pnumpy

You can also install the latest development versions with

pip install https://github.com/Quansight/pnumpy/archive/main.zip

Documentation

See the full documentation

To use the project:

import pnumpy as pn

Parallel NumPy speeds up NumPy silently under the hood. To see some benchmarks yourself run

pn.benchmark()

plot plot

To get a partial list of functions sped up run

pn.atop_info()

To disable or enable pnumpy run

pn.disable()
pn.enable()

Additional Functionality

PNumPy provides additional routines such as converting a NumPy record array to a column major array in parallel (pn.recarray_to_colmajor) which is useful for DataFrames. Other routines include pn.lexsort32, which performs an indirect sort using np.int32 instead of np.int64 consuming half the memory and running faster.

Threading

PNumPy uses a combination of threads and 256 bit vector intrinsics to speed up calculations. By default most operations will only use 3 additional worker threads in combination with the main python thread for a total 4. Large arrays are divided up into 16K chunks and threads are assigned to maintain cache coherency. More threads are dynamically deployed for more intensive CPU problems like np.sin. Users can customize threading. The example below shows how 4 threads can work together to quadruple the effective L2 cache size.

plot

To cap the number of additional worker threads to 3 run

pn.thread_setworkers(3)

To disable or re-enable threading run

pn.thread_disable()
pn.thread_enable()

To disable or re-enable just the atop engine run

pn.atop_disable()
pn.atop_enable()

FAQ

Q: If I type np.sort(a) where a is an array, will it be sped up?

A: If len(a) > 65536 and pnumpy has been imported, it will automatically be sped up

Q: How is sort sped up?

A: PNumPy uses additional threads to divide up the sorting job. For example it might perform an 8 way quicksort followed by a 4 way mergesort

Q: How is scikit or pandas sped up?

A: PNumPy's vector loops and threads will speed up any package that uses large NumPy arrays

Development

To run all the tests run:

python -m pip install pytest
python -m pytest tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].