Martin Diehl
df96110733
some suggestions from prospector/pylint
2022-01-29 22:38:17 +01:00
Martin Diehl
ce4591fa29
silence prospector on Python 3.9
2022-01-29 19:15:40 +01:00
Martin Diehl
609f13c590
Python 3.8 magic: The walrus operator ":="
2022-01-29 18:29:42 +01:00
Martin Diehl
bc667888ce
consistent style
2022-01-26 23:37:07 +01:00
Daniel Otto de Mentock
0c21b6a8e0
[skip ci] changed almost all function definition lines to multiline for colormap, grid, table, vtk and util modules
2022-01-26 16:25:27 +01:00
Martin Diehl
7c72bd48fb
simplified
2022-01-24 15:07:47 +01:00
Philip Eisenlohr
6bd23715b8
added multiplication as color repeat functionality
2022-01-24 11:56:33 +01:00
Daniel Otto de Mentock
77f22318a8
Typehint improvements
2022-01-20 11:52:56 +00:00
Martin Diehl
3acabcdc7f
docstring adjustments
2022-01-12 23:57:21 +01:00
Martin Diehl
410a515afc
allow flexible arguments for 1D arguments
2022-01-12 13:18:38 +00:00
Martin Diehl
508083082d
simplified
2021-12-21 23:50:43 +01:00
Martin Diehl
0468bfd3e1
Use ArrayLike for numpy >= 1.20
2021-12-18 17:21:46 +00:00
Philip Eisenlohr
32595299c9
minimal clean API for Colormap.at
2021-12-13 17:44:24 -05:00
Eureka Pai
2b6283bbe3
flexibility to return with alpha channel and/or as string
2021-12-10 12:53:01 -05:00
Franz Roters
7bb6707b0e
[skip ci] Web page was moved
2021-12-10 18:07:04 +01:00
Eureka Pai
947bf946e1
added Colormap.at(fraction) to interpolate
2021-12-10 11:31:26 -05:00
Philip Eisenlohr
b57351045b
follow new convention for "shape" and "len" in docstrings
2021-12-04 03:39:33 +01:00
Martin Diehl
2a6b37a0e5
eq. according to mypy recommendation
...
note that raising 'NotImplemented' means that __eq__ of the 'other' is
evaluated
https://stackoverflow.com/questions/54801832
https://newbedev.com/why-does-defining-the-argument-types-for-eq-throw-a-mypy-type-error
2021-12-03 12:35:25 +01:00
Martin Diehl
99166a7ce2
Merge remote-tracking branch 'origin/colormap-docstrings' into development
2021-12-03 12:18:24 +01:00
Philip Eisenlohr
dc3db90ce0
fixed typo: colormodel --> color model
2021-12-02 18:59:31 -05:00
Martin Diehl
5abfe3c214
Merge remote-tracking branch 'origin/development' into MSC-Version
2021-12-01 15:35:49 +01:00
Martin Diehl
3a51e1119b
text files on Unix should end with a new line character
2021-11-30 13:11:40 +01:00
Philip Eisenlohr
4d63da6aee
get_file_handle suffix is optional
2021-11-26 11:34:43 -05:00
Martin Diehl
4ba7c9e670
polishing
...
casting numpy.bool_ to bool is a little bit annoying. Mabye using Union[bool, np.bool_] is the better
solution, it does not require any changes to the actual code and there is some
hope that it will get fixed in mypy https://github.com/numpy/numpy/issues/18876
2021-11-25 21:29:34 +01:00
Philip Eisenlohr
bd908dc425
test __eq__; polish help strings
2021-11-25 13:14:34 -05:00
Martin Diehl
fb8c515a98
capitalize constants
...
not sure whether we should make exceptions for k_B and T_room
2021-11-25 11:52:52 +01:00
Martin Diehl
3cae915e47
not needed
...
a = [] is already a list
2021-11-24 21:12:13 +01:00
Martin Diehl
757ba4dba2
in-line with pathlib.Path
2021-11-24 17:28:00 +01:00
Philip Eisenlohr
3bf10127b8
added __eq__ and test
2021-11-23 17:46:38 -05:00
Philip Eisenlohr
3e1a6dcab7
polished help; streamlined from_range()
2021-11-23 17:20:07 -05:00
Martin Diehl
889ab87914
simplified and corrected
...
- Optional not needed for 'None' argument
- Use TextIO for typehints, TextIOWrapper seems to cause problems
- Test for tuple/list input for public functions
- internal functions that are always called with np.ndarray don't need
to offer flexibility. They might work, but we don't guarantee
anything.
2021-11-23 17:59:56 +01:00
Martin Diehl
3410a8d4cb
follow order of imports
...
- python standard library
- third party
- DAMASK internal
2021-11-23 16:34:50 +01:00
Daniel Otto de Mentock
8797282d37
added typehints for colormap module
2021-11-22 17:15:22 +01:00
Martin Diehl
a1bd633a9f
no need to reinvent the wheel
2021-08-28 17:49:44 +02:00
Martin Diehl
a48fa5d797
better readable and documented
2021-05-07 20:07:59 +02:00
Martin Diehl
24046ef683
support the user
2021-04-24 18:00:57 +02:00
Martin Diehl
26f37d822d
state return value
...
not for Rotation as its docstring is extended by Orientation
2021-04-23 19:15:11 +02:00
Martin Diehl
be9e00347b
cleaning
...
dropped support for legacy table
2021-03-27 10:11:31 +01:00
Philip Eisenlohr
0e57135239
[skip ci] dx.doi.org --> doi.org
2021-03-25 14:33:08 -04:00
Martin Diehl
7012099d0c
substituted broken link
2021-03-20 14:34:14 +01:00
Martin Diehl
07d79ef4ba
unifying style
2021-03-17 11:25:21 +01:00
Martin Diehl
4e31862f0f
avoid repetition
2021-02-10 18:35:13 +01:00
Martin Diehl
6895ef6b18
always write LF line endings
...
small pitfall: I windows users use a filehandle that results from a call
to open() without the newline option, they get still CRLF line endings
2021-02-10 10:03:35 +01:00
Martin Diehl
2e28bc127a
better message in case that GUI is not possible
2020-12-10 23:44:54 +01:00
Martin Diehl
ac0a20696c
rename: grid -> cells
2020-12-03 22:16:34 +01:00
Martin Diehl
a8fec922d5
show name in title
2020-11-16 17:25:13 +01:00
Philip Eisenlohr
5a53f8743b
added to docstring
2020-11-16 10:44:33 -05:00
Philip Eisenlohr
de20e6b35d
code shortening; list_predefined() --> property "predefined"
2020-11-16 10:23:26 -05:00
Martin Diehl
1541ac0add
more intuitive use
2020-11-15 12:38:54 +01:00
Franz Roters
3612b17295
corrected Sphinx warnings
2020-09-23 16:21:20 +02:00