Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Nov 2021 13:45:20 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 89a1d5adfd5a - main - math/py-ndindex: Add 1.5.2
Message-ID:  <202111011345.1A1DjK7Z048591@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89a1d5adfd5a554d102d6017b8ef43567bb6684a

commit 89a1d5adfd5a554d102d6017b8ef43567bb6684a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 13:23:26 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 13:41:21 +0000

    math/py-ndindex: Add 1.5.2
    
    ndindex is a library that allows representing and manipulating objects that can
    be valid indices to numpy arrays, i.e., slices, integers, ellipses, None,
    integer and boolean arrays, and tuples thereof. The goals of the library are:
    - Provide a uniform API to manipulate these objects. Unlike the standard index
      objects themselves like slice, int, and tuple, which do not share any methods
      in common related to being indices, ndindex classes can all be manipulated
      uniformly. For example, idx.args always gives the arguments used to construct
      idx.
    - Give 100% correct semantics as defined by numpy's ndarray. This means that
      ndindex will not make a transformation on an index object unless it is correct
      for all possible input array shapes. The only exception to this rule is that
      ndindex assumes that any given index will not raise IndexError (for instance,
      from an out of bounds integer index or from too few dimensions). For those
      operations where the array shape is known, there is a reduce() method to
      reduce an index to a simpler index that is equivalent for the given shape.
    - Enable useful transformation and manipulation functions on index objects.
    
    WWW: https://github.com/Quansight-Labs/ndindex
---
 math/Makefile             |  1 +
 math/py-ndindex/Makefile  | 23 +++++++++++++++++++++++
 math/py-ndindex/distinfo  |  3 +++
 math/py-ndindex/pkg-descr | 18 ++++++++++++++++++
 4 files changed, 45 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index 1fe9497f83f0..ca22db043f4d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -859,6 +859,7 @@
     SUBDIR += py-mpmath
     SUBDIR += py-munkres
     SUBDIR += py-munkres10
+    SUBDIR += py-ndindex
     SUBDIR += py-networkx
     SUBDIR += py-nevergrad
     SUBDIR += py-numexpr
diff --git a/math/py-ndindex/Makefile b/math/py-ndindex/Makefile
new file mode 100644
index 000000000000..bef1f8e1ddbe
--- /dev/null
+++ b/math/py-ndindex/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	ndindex
+PORTVERSION=	1.5.2
+CATEGORIES=	math python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Python library for manipulating indices of ndarrays
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sympy>=0:math/py-sympy@${PY_FLAVOR}
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/math/py-ndindex/distinfo b/math/py-ndindex/distinfo
new file mode 100644
index 000000000000..af7b3ab17307
--- /dev/null
+++ b/math/py-ndindex/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1635730879
+SHA256 (ndindex-1.5.2.tar.gz) = e35fe1babe2d11c0b7af55b93b64f9c2725ea19a5d81c973fb8a2db5fbf3902e
+SIZE (ndindex-1.5.2.tar.gz) = 65104
diff --git a/math/py-ndindex/pkg-descr b/math/py-ndindex/pkg-descr
new file mode 100644
index 000000000000..6ed3a2eb7957
--- /dev/null
+++ b/math/py-ndindex/pkg-descr
@@ -0,0 +1,18 @@
+ndindex is a library that allows representing and manipulating objects that can
+be valid indices to numpy arrays, i.e., slices, integers, ellipses, None,
+integer and boolean arrays, and tuples thereof. The goals of the library are:
+- Provide a uniform API to manipulate these objects. Unlike the standard index
+  objects themselves like slice, int, and tuple, which do not share any methods
+  in common related to being indices, ndindex classes can all be manipulated
+  uniformly. For example, idx.args always gives the arguments used to construct
+  idx.
+- Give 100% correct semantics as defined by numpy's ndarray. This means that
+  ndindex will not make a transformation on an index object unless it is correct
+  for all possible input array shapes. The only exception to this rule is that
+  ndindex assumes that any given index will not raise IndexError (for instance,
+  from an out of bounds integer index or from too few dimensions). For those
+  operations where the array shape is known, there is a reduce() method to
+  reduce an index to a simpler index that is equivalent for the given shape.
+- Enable useful transformation and manipulation functions on index objects.
+
+WWW: https://github.com/Quansight-Labs/ndindex



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111011345.1A1DjK7Z048591>