1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

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
This commit is contained in:
Po-Chuan Hsieh 2021-11-01 21:23:26 +08:00
parent 83d7ba7947
commit 89a1d5adfd
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
4 changed files with 45 additions and 0 deletions

View File

@ -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

23
math/py-ndindex/Makefile Normal file
View File

@ -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>

3
math/py-ndindex/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1635730879
SHA256 (ndindex-1.5.2.tar.gz) = e35fe1babe2d11c0b7af55b93b64f9c2725ea19a5d81c973fb8a2db5fbf3902e
SIZE (ndindex-1.5.2.tar.gz) = 65104

18
math/py-ndindex/pkg-descr Normal file
View File

@ -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