Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
.. image:: https://raw.githubusercontent.com/scikit-hep/awkward-0.x/master/docs/source/logo-300px.png :alt: awkward-array :target: https://github.com/scikit-hep/awkward-0.x
|
.. inclusion-marker-1-5-do-not-remove
Calculations with rectangular, numerical data are simpler and faster in Numpy than traditional for loops. Consider, for instance,
.. code-block:: python
all_r = []
for x, y in zip(all_x, all_y):
all_r.append(sqrt(x**2 + y**2))
versus
.. code-block:: python
all_r = sqrt(all_x**2 + all_y**2)
Not only is the latter easier to read, it's hundreds of times faster than the for loop (and provides opportunities for hidden vectorization and parallelization). However, the Numpy abstraction stops at rectangular arrays of numbers or character strings. While it's possible to put arbitrary Python data in a Numpy array, Numpy's dtype=object
is essentially a fixed-length list: data are not contiguous in memory and operations are not vectorized.
Awkward Array is a pure Python+Numpy library for manipulating complex data structures as you would Numpy arrays. Even if your data structures
this library can access them as columnar data structures <https://towardsdatascience.com/the-beauty-of-column-oriented-data-2945c0c9f560>
, with the efficiency of Numpy arrays. They may be converted from JSON or Python data, loaded from "awkd" files, HDF5 <https://www.hdfgroup.org>
, Parquet <https://parquet.apache.org>
, or ROOT <https://root.cern>
files, or they may be views into memory buffers like Arrow <https://arrow.apache.org>
__.
.. inclusion-marker-2-do-not-remove
Install Awkward Array like any other Python package:
.. code-block:: bash
pip install awkward0 # maybe with sudo or --user, or in virtualenv
The base awkward0
package requires only Numpy <https://scipy.org/install.html>
__ (1.13.1+).
pyarrow <https://arrow.apache.org/docs/python/install.html>
__ to view Arrow and Parquet data as Awkward Arraysh5py <https://www.h5py.org>
__ to read and write Awkward Arrays in HDF5 filesPandas <https://pandas.pydata.org>
__ as an alternative viewFAQs
Manipulate arrays of complex data structures as easily as Numpy.
We found that awkward0 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.