scispace - formally typeset
Open AccessJournal ArticleDOI

Array programming with NumPy

Reads0
Chats0
TLDR
In this paper, the authors review how a few fundamental array concepts lead to a simple and powerful programming paradigm for organizing, exploring and analysing scientific data, and their evolution into a flexible interoperability layer between increasingly specialized computational libraries is discussed.
Abstract
Array programming provides a powerful, compact and expressive syntax for accessing, manipulating and operating on data in vectors, matrices and higher-dimensional arrays. NumPy is the primary array programming library for the Python language. It has an essential role in research analysis pipelines in fields as diverse as physics, chemistry, astronomy, geoscience, biology, psychology, materials science, engineering, finance and economics. For example, in astronomy, NumPy was an important part of the software stack used in the discovery of gravitational waves1 and in the first imaging of a black hole2. Here we review how a few fundamental array concepts lead to a simple and powerful programming paradigm for organizing, exploring and analysing scientific data. NumPy is the foundation upon which the scientific Python ecosystem is constructed. It is so pervasive that several projects, targeting audiences with specialized needs, have developed their own NumPy-like interfaces and array objects. Owing to its central position in the ecosystem, NumPy increasingly acts as an interoperability layer between such array computation libraries and, together with its application programming interface (API), provides a flexible framework to support the next decade of scientific and industrial analysis. NumPy is the primary array programming library for Python; here its fundamental concepts are reviewed and its evolution into a flexible interoperability layer between increasingly specialized computational libraries is discussed.

read more

Content maybe subject to copyright    Report

Citations
More filters
Journal ArticleDOI

CMB power spectra and cosmological parameters from Planck PR4 with CamSpec

TL;DR: In this article , angular power spectra and cosmological parameter constraints derived from the Planck PR4 (NPIPE ) maps of the Cosmic Microwave Background are presented. But they do not consider the effect of noise on the frequency maps.
Journal ArticleDOI

Embracing New Techniques in Deep Learning for Estimating Image Memorability

TL;DR: Five alternative deep learning models which exploit developments in the field from the last five years, largely the introduction of residual neural networks, which are intended to allow the model to use semantic information in the memorability estimation process are proposed and evaluated.
Journal ArticleDOI

Weighing the Galactic disk in sub-regions of the solar neighbourhood using Gaia DR2

Abstract: We infer the gravitational potential of the Galactic disk by analysing the phase-space densities of 120 stellar samples in 40 spatially separate sub-regions of the solar neighbourhood, using Gaia's second data release (DR2), in order to quantify spatially dependent systematic effects that bias this type of measurement. The gravitational potential was inferred under the assumption of a steady state in the framework of a Bayesian hierarchical model. We performed a joint fit of our stellar tracers' three-dimensional velocity distribution, while fully accounting for the astrometric uncertainties of all stars. The inferred gravitational potential is compared, post-inference, to a model for the baryonic matter and halo dark matter components. We see an unexpected but clear trend for all 40 spatially separate sub-regions: Compared to the potential derived from the baryonic model, the inferred gravitational potential is significantly steeper close to the Galactic mid-plane (<60 pc), but flattens such that the two agree well at greater distances (~400 pc). The inferred potential implies a total matter density distribution that is highly concentrated to the Galactic mid-plane and decays quickly with height. Apart from this, there are discrepancies between stellar samples, implying spatially dependent systematic effects which are, at least in part, explained by substructures in the phase-space distributions. In terms of the inferred matter density distribution, the very low matter density that is inferred at greater heights is inconsistent with the observed scale height and matter distribution of the stellar disk, which cannot be explained by a misunderstood density of cold gas or other hidden mass. Our interpretation is that these results must be biased by a time-varying phase-space structure, possibly a breathing mode, that is large enough to affect all stellar samples in the same manner.
References
More filters
Journal Article

Scikit-learn: Machine Learning in Python

TL;DR: Scikit-learn is a Python module integrating a wide range of state-of-the-art machine learning algorithms for medium-scale supervised and unsupervised problems, focusing on bringing machine learning to non-specialists using a general-purpose high-level language.
Journal ArticleDOI

Matplotlib: A 2D Graphics Environment

TL;DR: Matplotlib is a 2D graphics package used for Python for application development, interactive scripting, and publication-quality image generation across user interfaces and operating systems.
Journal ArticleDOI

SciPy 1.0--Fundamental Algorithms for Scientific Computing in Python

TL;DR: SciPy as discussed by the authors is an open source scientific computing library for the Python programming language, which includes functionality spanning clustering, Fourier transforms, integration, interpolation, file I/O, linear algebra, image processing, orthogonal distance regression, minimization algorithms, signal processing, sparse matrix handling, computational geometry, and statistics.
Proceedings ArticleDOI

TensorFlow: a system for large-scale machine learning

TL;DR: TensorFlow as mentioned in this paper is a machine learning system that operates at large scale and in heterogeneous environments, using dataflow graphs to represent computation, shared state, and the operations that mutate that state.
Related Papers (5)