Skip to content

Commit 4937a69

Browse files
committed
replace list(set()) with np.unique() calls
1 parent 29e1998 commit 4937a69

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66
The format is based on `Keep a Changelog`_,
77
and this project adheres to `Semantic Versioning`_.
88

9+
`1.5.6`_ - 2022-09-01
10+
--------------------------
11+
Fixed
12+
'''''''
13+
- Bug in RasterMesh VTK writer.
14+
915
`1.5.5`_ - 2022-08-31
1016
--------------------------
1117
Changed
@@ -286,7 +292,8 @@ Added
286292

287293
.. LINKS
288294
289-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.5...HEAD
295+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.6...HEAD
296+
.. _`1.5.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.5...v1.5.6
290297
.. _`1.5.5`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.4...v1.5.5
291298
.. _`1.5.4`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.3...v1.5.4
292299
.. _`1.5.3`: https://github.com/kip-hart/MicroStructPy/compare/v1.5.2...v1.5.3

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def find_version(*fname):
7979
'aabbtree>=2.5.0',
8080
'pybind11', # must come before meshpy for successful install
8181
'lsq-ellipse',
82-
'matplotlib>=3.0.0',
82+
'matplotlib>=3.3.0',
8383
'meshpy>=2018.2.1',
8484
'numpy>=1.13.0',
8585
'pygmsh>=7.0.2',

src/microstructpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
import microstructpy.seeding
55
import microstructpy.verification
66

7-
__version__ = '1.5.5'
7+
__version__ = '1.5.6'

src/microstructpy/meshing/trimesh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,8 @@ def write(self, filename, format='txt', seeds=None, polymesh=None):
11701170
pt_fmt = '{: f} {: f} {: f}\n'
11711171

11721172
# Dimensions
1173-
coords = [list(set(ax)) for ax in zip(*self.points)]
1173+
pts = np.array(self.points)
1174+
coords = [np.unique(ax) for ax in pts.T]
11741175
if len(coords) < 3:
11751176
coords.append([0]) # force z=0 for 2D meshes
11761177
dims = [len(c) for c in coords]

0 commit comments

Comments
 (0)