Closed hakonanes closed 1 year ago
The failing test on Windows Python 3.9 is reported in #403 and fixed in #402.
@hakonanes thanks for doing this, I seem to remember we foresaw this problem at the time. I wonder whether you think there is any utility in rounding to 10dp, or adding a decimal_places kwarg to the affected functions, eg. unique?
I wonder whether you think there is any utility in rounding to 10dp
To be on the safe side? I'm fine with that as long as all tests pass (which they do on my machine)! I'll do this.
or adding a decimal_places kwarg to the affected functions, eg. unique?
Yes, this seems like the simplest solution. This way the precision can be set based on an application's requirement. It wouldn't have fixed the issue with Miller.symmetrise(unique=True)
though, unless the internal call to Miller.unique()
set the precision to 11 or lower.
This should be done in a separate PR to develop
, to be released in the next minor v0.11.0, right?
I wonder whether you think there is any utility in rounding to 10dp
To be on the safe side? I'm fine with that as long as all tests pass (which they do on my machine)! I'll do this.
or adding a decimal_places kwarg to the affected functions, eg. unique?
Yes, this seems like the simplest solution. This way the precision can be set based on an application's requirement. It wouldn't have fixed the issue with
Miller.symmetrise(unique=True)
though, unless the internal call toMiller.unique()
set the precision to 11 or lower.This should be done in a separate PR to
develop
, to be released in the next minor v0.11.0, right?
still merging this, because @hakonanes is correct that new functionality needs to be saved for 0.11.0
Thank you both for quickly responding to this fix @harripj and @pc494. I've changed from 11 to 10 decimals.
Ideally, I would wait for @Martin-Rudolph to confirm that this branch fixes his issue so that Miller.symmetrise(unique=True)
returns what he expects.
will hold fire on the merge then :)
This PR can be merged once checks pass (the single fail is OK)! I plan to release 0.10.2 once it is merged.
Thanks a lot Phillip! Just published the automatically created release, and now orix 0.10.2 is out on PyPI. Will follow up with a post-release PR to develop
and a conda-forge release once their bot makes a PR.
Description of the change
Changing rounding from 12 to ~11~ 10 decimals before finding unique vectors and rotations fixes a case where too many plane normals were returned from
Miller.symmetrise(unique=True)
. This fixes #404 reported @Martin-Rudolph. To be consistent, I changed all rounding in orix where 12 decimals was used.This PR is aimed at
main
, so that we can release this fix immediately as a v0.10.2 patch. I set the release date in the changelog to Tuesday, 2022-10-25.I've also made minor changes to type hints and formatting to silence some warnings raised by my code editor.
Progress of the PR
Minimal example of the bug fix or new feature
The issue reported by @Martin-Rudolph
With this fix, the last call returns
For reviewers
__init__.py
.CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.