aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-10-13 14:56:15 +0200
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-10-22 11:02:36 +0200
commit1e656049b01bdeb2370229641ef8e0def92b4f89 (patch)
treec0740c1392f2b4b4137c55296d08749e6ccf6f59 /gnu/packages/python.scm
parente0a7d364589578a9b75943f827b05e74e7b63dea (diff)
downloadpatches-1e656049b01bdeb2370229641ef8e0def92b4f89.tar
patches-1e656049b01bdeb2370229641ef8e0def92b4f89.tar.gz
gnu: Add python-numexpr.
* gnu/packages/python.scm (python-numexpr, python2-numexpr): New variables.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c972b62500..9721343235 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3060,6 +3060,43 @@ that client code uses to construct the grammar directly in Python code.")
(define-public python2-numpydoc
(package-with-python2 python-numpydoc))
+(define-public python-numexpr
+ (package
+ (name "python-numexpr")
+ (version "2.4.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/"
+ "n/numexpr/numexpr-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
+ (build-system python-build-system)
+ (arguments `(#:tests? #f)) ; no tests included
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)))
+ (home-page "https://github.com/pydata/numexpr")
+ (synopsis "Fast numerical expression evaluator for NumPy")
+ (description
+ "Numexpr is a fast numerical expression evaluator for NumPy. With it,
+expressions that operate on arrays are accelerated and use less memory than
+doing the same calculation in Python. In addition, its multi-threaded
+capabilities can make use of all your cores, which may accelerate
+computations, most specially if they are not memory-bounded (e.g. those using
+transcendental functions).")
+ (license license:expat)))
+
+(define-public python2-numexpr
+ (let ((numexpr (package-with-python2 python-numexpr)))
+ (package (inherit numexpr)
+ ;; Make sure to use special packages for Python 2 instead
+ ;; of those automatically rewritten by package-with-python2.
+ (propagated-inputs
+ `(("python2-numpy" ,python2-numpy)
+ ,@(alist-delete "python-numpy"
+ (package-propagated-inputs numexpr)))))))
+
(define-public python-matplotlib
(package
(name "python-matplotlib")