Skip to content

Commit fe772de

Browse files
authored
Merge pull request #126 from MechMicroMan/125-error-with-findgrains
Fix #125
2 parents 4edef2d + fea80a3 commit fe772de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

defdap/hrdic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,8 @@ def findGrains(self, algorithm=None, minGrainSize=10):
938938
# Find grain by masking the native ebsd grain image with
939939
# selected grain from the warped dic grain image. The modal
940940
# value is the EBSD grain label.
941-
modeId, _ = mode(self.ebsdMap.grains[warpedDicGrains == i + 1])
942-
ebsd_grain_idx = modeId[0] - 1
941+
modeId, _ = mode(self.ebsdMap.grains[warpedDicGrains == i + 1], keepdims=False)
942+
ebsd_grain_idx = modeId - 1
943943
self.ebsdGrainIds.append(ebsd_grain_idx)
944944
self[i].ebsdGrainId = ebsd_grain_idx
945945
self[i].ebsdGrain = self.ebsdMap[ebsd_grain_idx]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_version():
5353
package_data={'defdap': ['slip_systems/*.txt']},
5454
python_requires='>=3.6',
5555
install_requires=[
56-
'scipy',
56+
'scipy>=1.9',
5757
'numpy',
5858
'matplotlib>=3.0.0',
5959
'scikit-image',

0 commit comments

Comments
 (0)