Skip to content

Commit

Permalink
Merge pull request sigma-py#398 from nschloe/assert-simplex-shape
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe authored Dec 17, 2020
2 parents b58e184 + 6b0d603 commit 319a3cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ upload: clean
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
# python3 setup.py sdist bdist_wheel
# https://stackoverflow.com/a/58756491/353337
python3 -m pep517.build --source --binary .
python3 -m build --sdist --wheel .
twine upload dist/*

tag:
Expand Down
3 changes: 1 addition & 2 deletions quadpy/t3/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
if weight_factor is not None:
weights *= weight_factor

super().__init__(name, 2, weights, points, degree, source, tol)
super().__init__(name, 3, weights, points, degree, source, tol)
self.domain = "T3"

def show(
Expand All @@ -48,7 +48,6 @@ def show(
edges,
render=render,
)
return


def _s4(dummy):
Expand Down
5 changes: 5 additions & 0 deletions quadpy/tn/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def points_inside_or_boundary(self):
def integrate(self, f, simplex, dot=numpy.dot):
flt = numpy.vectorize(float)
simplex = numpy.asarray(simplex)
if simplex.shape[0] != self.dim + 1:
string = ", ".join(str(val) for val in simplex.shape)
raise QuadpyError(
f"Wrong domain shape. Expected ({self.dim + 1}, ...), got ({string})."
)
x = transform(flt(self.points), simplex.T)
vol = get_vol(simplex)

Expand Down
5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = quadpy
version = 0.16.4
version = 0.16.5
author = Nico Schlömer
author_email = [email protected]
description = Numerical integration, quadrature for various domains
Expand Down Expand Up @@ -44,9 +44,6 @@ install_requires =
scipy
sympy
python_requires = >=3.6
setup_requires =
setuptools>=42
wheel

[options.extras_require]
all =
Expand Down

0 comments on commit 319a3cd

Please sign in to comment.