unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mădălin Ionel Patrașcu" <madalinionel.patrascu@mdc-berlin.de>
To: <46955@debbugs.gnu.org>
Cc: rekado@elephly.net,
	"Mădălin Ionel Patrașcu" <madalinionel.patrascu@mdc-berlin.de>
Subject: [bug#46955] [PATCH 1/3] gnu: Add python-sparse.
Date: Sun, 6 Jun 2021 02:06:49 +0200	[thread overview]
Message-ID: <20210606000651.28252-1-madalinionel.patrascu@mdc-berlin.de> (raw)
In-Reply-To: <76dfa82e-53e2-c4fc-d002-df71f348cdc8@mdc-berlin.de>

* gnu/packages/python-xyz.scm(python-sparse): New variable.
---
 gnu/packages/python-xyz.scm | 47 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b63c2852d5..a4fe31a01f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -67,7 +67,7 @@
 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
@@ -5147,6 +5147,51 @@ objects.")
 (define-public python2-colormath
   (package-with-python2 python-colormath))
 
+(define-public python-sparse
+  (package
+    (name "python-sparse")
+    (version "0.12.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sparse" version))
+       (sha256
+        (base32
+         "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest" "-v")))))))
+    (propagated-inputs
+     `(("python-numba" ,python-numba)
+       ("python-numpy" ,python-numpy)
+       ("python-scipy" ,python-scipy)))
+    (native-inputs
+     `(("python-dask" ,python-dask)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-black" ,python-pytest-black)
+       ("python-pytest-cov" ,python-pytest-cov)))
+    (home-page "https://github.com/pydata/sparse/")
+    (synopsis "Library for multi-dimensional sparse arrays")
+    (description
+     "This package implements sparse arrays of arbitrary dimension on top of
+@code{numpy} and @code{scipy.sparse}.  Sparse array is a matrix in which most
+of the elements are zero.  @code{python-sparse} generalizes the
+@code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
+extends beyond just rows and columns to an arbitrary number of dimensions.
+Additionally, this project maintains compatibility with the
+@code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
+used in @code{scipy.sparse}.  These differences make this project useful in
+certain situations where @code{scipy.sparse} matrices are not well suited, but
+it should not be considered a full replacement.  It lacks layouts that are not
+easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
+depends on @code{scipy.sparse} for some computations.")
+    (license license:bsd-3)))
+
 (define-public python-spectra
   (package
     (name "python-spectra")
-- 
2.31.1





  parent reply	other threads:[~2021-06-06  0:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06  0:54 [bug#46955] (no subject) Mădălin Ionel Patrașcu
2021-03-06  0:57 ` [bug#46955] [PATCH 1/2] gnu: Add python-sparse Mădălin Ionel Patrașcu
2021-03-06  0:57   ` [bug#46955] [PATCH 2/2] gnu: python-cooler: Update to 0.8.10 Mădălin Ionel Patrașcu
2021-04-01 15:09     ` Ricardo Wurmus
2021-04-01 15:07   ` [bug#46955] [PATCH 1/2] gnu: Add python-sparse Ricardo Wurmus
2021-04-01 15:10   ` Ricardo Wurmus
     [not found] ` <handler.46955.B.16149920915786.ack@debbugs.gnu.org>
2021-06-03 23:23   ` [bug#46955] [ext] bug#46955: Acknowledgement ((no subject)) Mădălin Ionel Patrașcu
2021-06-03 23:25 ` [bug#46955] [PATCH 1/3] gnu: Add python-sparse Mădălin Ionel Patrașcu
2021-06-03 23:25   ` [bug#46955] [PATCH 2/3] gnu: Add python-ipytree Mădălin Ionel Patrașcu
2021-06-03 23:25   ` [bug#46955] [PATCH 3/3] gnu: python-cooler: Update to 0.8.11 Mădălin Ionel Patrașcu
2021-06-05 10:06     ` Maxime Devos
2021-06-06  0:03       ` [bug#46955] [ext] " Mădălin Ionel Patrașcu
2021-06-06  0:06 ` Mădălin Ionel Patrașcu [this message]
2021-06-06  0:06   ` [bug#46955] [PATCH 2/3] gnu: Add python-ipytree Mădălin Ionel Patrașcu
2021-06-06  6:23     ` Ricardo Wurmus
2021-06-06  0:06   ` [bug#46955] [PATCH 3/3] gnu: python-cooler: Update to 0.8.11 Mădălin Ionel Patrașcu
2021-06-06  6:36     ` bug#46955: " Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210606000651.28252-1-madalinionel.patrascu@mdc-berlin.de \
    --to=madalinionel.patrascu@mdc-berlin.de \
    --cc=46955@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).