From patchwork Thu Jun 3 23:25:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TcSDZMSDbGluIElvbmVsIFBhdHJhyJljdQ==?= X-Patchwork-Id: 29899 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E981627BC81; Fri, 4 Jun 2021 00:26:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 566DD27BC78 for ; Fri, 4 Jun 2021 00:26:20 +0100 (BST) Received: from localhost ([::1]:43264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lowjD-0005GO-Ey for patchwork@mira.cbaines.net; Thu, 03 Jun 2021 19:26:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lowix-0004yU-8d for guix-patches@gnu.org; Thu, 03 Jun 2021 19:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lowix-0003Jw-1c for guix-patches@gnu.org; Thu, 03 Jun 2021 19:26:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lowiv-0000cR-Uf for guix-patches@gnu.org; Thu, 03 Jun 2021 19:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#46955] [PATCH 1/3] gnu: Add python-sparse. References: <76dfa82e-53e2-c4fc-d002-df71f348cdc8@mdc-berlin.de> In-Reply-To: <76dfa82e-53e2-c4fc-d002-df71f348cdc8@mdc-berlin.de> Resent-From: =?utf-8?b?TcSDZMSDbGlu?= Ionel =?utf-8?b?UGF0cmHImWN1?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Jun 2021 23:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46955 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: <46955@debbugs.gnu.org> Cc: rekado@elephly.net, =?utf-8?b?TcSDZMSDbGlu?= Ionel =?utf-8?b?UGF0cmE=?= =?utf-8?b?yJljdQ==?= Received: via spool by 46955-submit@debbugs.gnu.org id=B46955.16227627392325 (code B ref 46955); Thu, 03 Jun 2021 23:26:01 +0000 Received: (at 46955) by debbugs.gnu.org; 3 Jun 2021 23:25:39 +0000 Received: from localhost ([127.0.0.1]:44994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lowiT-0000bD-BZ for submit@debbugs.gnu.org; Thu, 03 Jun 2021 19:25:39 -0400 Received: from c2062.mx.srv.dfn.de ([194.95.238.172]:52173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lowiR-0000az-JW for 46955@debbugs.gnu.org; Thu, 03 Jun 2021 19:25:32 -0400 Received: from localhost (localhost [127.0.0.1]) by c2062.mx.srv.dfn.de (Postfix) with ESMTP id 1D4F8300306; Fri, 4 Jun 2021 01:25:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mdc-berlin.de; h= content-transfer-encoding:content-type:content-type:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=mdc; t=1622762724; x=1624577125; bh=UWFJyDehJ1kfpwaXoIjs7U1xylOqymhtwuob30fVkdk=; b=HcJOzh59V2IU Bb9ii9PZQaXSXmmUQCYUxja2tEdfezyZ1rNQT2q87HMITbKhylzPDGB5uP+19UFK 6wLEoI05OSoqGo6+hgPT5AvKMUCGJuH+CATQQIajMGzujwAnyB5XaM75PkP58dYh NMVzxTVKc/zAd/HrwMsv8mk4cpfvJS0= Received: from c2062.mx.srv.dfn.de ([127.0.0.1]) by localhost (mgw4-erl.srv.dfn.de [127.0.0.1]) (amavisd-new, port 20134) with ESMTP id wp-l88jSPyTF; Fri, 4 Jun 2021 01:25:24 +0200 (CEST) Received: from SW-IT-P-EX4.mdc-berlin.net (mgw4.mdc-berlin.de [141.80.113.62]) by c2062.mx.srv.dfn.de (Postfix) with ESMTPS; Fri, 4 Jun 2021 01:25:24 +0200 (CEST) Received: from Guix-Ubuntu18.04 (141.80.113.106) by SW-IT-P-EX4.mdc-berlin.net (141.80.113.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 4 Jun 2021 01:25:24 +0200 From: =?utf-8?b?TcSDZMSDbGlu?= Ionel =?utf-8?b?UGF0cmHImWN1?= Date: Fri, 4 Jun 2021 01:25:01 +0200 Message-ID: <20210603232503.29253-1-madalinionel.patrascu@mdc-berlin.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [141.80.113.106] X-ClientProxiedBy: SW-IT-P-EX4.mdc-berlin.net (141.80.113.62) To SW-IT-P-EX4.mdc-berlin.net (141.80.113.62) X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1012-26198.003 X-TM-AS-Result: No-10--3.163100-8.000000 X-TMASE-MatchedRID: JsCi/JRnBFH/R1NSMc2qCXycvC6I0dJIS1zwNuiBtITfUZT83lbkEJwl bZPQQ0yzb1TGnuLRfUkctkosP3yazCq+GZ9ZHxIhUYXhMajr0x53G1bsm5zfjMZygq/CPmro6n1 Gl4gVhHhV9cEoYbjAXbc/ZCLk5AauxmNZL79yeAzakOg7uhpPs17OZ6hrwwnz6Mw4RnkAvRKYeA TzrE2lR+awqowSxfEnLb6XLHjqIvT7lPrMqaVmF1XXOFXDx25iF430d3dMHka8B7vl7G5M0USuy wxB3Ejk51xw3PCMlNY3HexY7VSIcWcOYd1wAQIAAD5jSg1rFtBbV4KUZZg3KOcJOFqc/+CEYmUf TlXs3OOTKxCEEoHeWpfAZqrFvhSOow4viWN+bNz0VCHd+VQiHgseQVcTRnF2lwV2iaAfSWeDGx/ OQ1GV8t0H8LFZNFG7doMssNsUwYXo09dPgSR9YSpNcadNZa+YJIT50xoHh8EN9e4Mmup6udS4hm c+rT+o70vMLL1IbJl/vFbd53rshd0wC0yCvbeT4PtO+H6AT5HX7GF+64huyLjmNKuuvgamoYI1e rIuEsW+g2RZj2FKy60Cnu9RmLpv X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.163100-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1012-26198.003 X-TM-SNTS-SMTP: 6B40151B4D47BCF75A2350635158A5B4D77CEC51A8B6784E622A313B49E33CB62000:F X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm(python-sparse): New variable. --- gnu/packages/python-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a5cc04edaf..35ce8d1cbe 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -67,7 +67,7 @@ ;;; Copyright © 2019, 2020 Giacomo Leidi ;;; Copyright © 2019 Wiktor Żelazny ;;; Copyright © 2019, 2020 Tanguy Le Carrour -;;; Copyright © 2019 Mădălin Ionel Patrașcu +;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu ;;; Copyright © 2020 Riku Viitanen ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 sirgazil @@ -5132,6 +5132,52 @@ 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 inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv") + #t))))) + (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")