unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Figiel <troy@troyfigiel.com>
To: 68789@debbugs.gnu.org
Subject: [bug#68789] [PATCH 1/2] gnu: Add python-unyt.
Date: Sun, 28 Jan 2024 22:47:17 +0100	[thread overview]
Message-ID: <87h6ixf4u6.fsf@troyfigiel.com> (raw)
In-Reply-To: <87il3df4y5.fsf@troyfigiel.com>

* gnu/packages/python-science.scm (python-unyt): New variable.
---
 gnu/packages/python-science.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 9d72608de4..3013c77c34 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -42,6 +42,7 @@
 (define-module (gnu packages python-science)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
+  #:use-module (gnu packages astronomy)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bioinformatics)
   #:use-module (gnu packages boost)
@@ -1217,6 +1218,34 @@ (define-public python-statannot
 annotations on an existing boxplots and barplots generated by seaborn.")
     (license license:expat)))
 
+(define-public python-unyt
+  (package
+    (name "python-unyt")
+    (version "3.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "unyt" version))
+       (sha256
+        (base32 "00900bw24rxgcgwgxp9xlx0l5im96r1n5hn0r3mxvbdgc3lyyq48"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-h5py ;optional import
+                             python-matplotlib ;optional import
+                             python-numpy
+                             python-sympy))
+    ;; python-astropy and python-pint are also optional imports, but we do not
+    ;; propagate them due to their sizes.
+    (native-inputs (list python-astropy python-pint python-pytest))
+    (home-page "https://unyt.readthedocs.io")
+    (synopsis "Library for working with data that has physical units")
+    (description
+     "Writing code that deals with data with physical units can be confusing.
+A function might return an array but at least with plain @code{numpy}, there
+is no way to easily tell what the units of the data are without somehow
+knowing a priori.  @code{unyt} handles this problem by providing a subclass of
+the @code{ndarray} class in @code{numpy} that is unit aware.")
+    (license license:bsd-3)))
+
 (define-public python-upsetplot
   (package
     (name "python-upsetplot")
-- 
2.42.0





  reply	other threads:[~2024-01-28 22:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 22:49 [bug#68789] [PATCH 0/2] gnu: Add python-pyjanitor Troy Figiel
2024-01-28 21:47 ` Troy Figiel [this message]
2024-01-28 22:13 ` [bug#68789] [PATCH 2/2] " Troy Figiel
2024-01-29 14:26 ` [bug#68789] [PATCH 0/2] " Sharlatan Hellseher
2024-01-29 17:18   ` Troy Figiel
2024-01-29 17:31     ` Sharlatan Hellseher
2024-01-29 18:13       ` Troy Figiel
2024-01-29 18:16 ` [bug#68789] [PATCH 1/2] gnu: Add python-unyt Troy Figiel
2024-01-29 18:17 ` [bug#68789] [PATCH 2/2] gnu: Add python-pyjanitor Troy Figiel
2024-01-29 18:18 ` [bug#68789] [PATCH v2 0/2] " Troy Figiel
2024-01-29 23:01 ` bug#68789: [PATCH " Sharlatan Hellseher

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=87h6ixf4u6.fsf@troyfigiel.com \
    --to=troy@troyfigiel.com \
    --cc=68789@debbugs.gnu.org \
    /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).