From f003e0d6d67dc884ff67c64155b07a1d00df4962 Mon Sep 17 00:00:00 2001 From: dboe <dboe@ipp.mpg.de> Date: Fri, 27 May 2022 19:33:27 +0200 Subject: [PATCH] cleanup --- README.rst | 5 +++++ tfields/core.py | 5 ++++- tfields/mesh_3d.py | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 8dcb2d3..cdccdae 100644 --- a/README.rst +++ b/README.rst @@ -55,3 +55,8 @@ The following features should be highlighted: * TensorMaps with fields * Mesh manipulation by graph theory * TODO + +Review of alternative/supplementary APIs +---------------------------------------- +* `sympy.diffgeom`: https://docs.sympy.org/latest/modules/diffgeom.html - Symbolic differential algebra implementation. It is not yet covering a broad variety of functionality and is not so well maintained. +* Units: You can find a comparison of modules handling units here: https://socialcompare.com/en/comparison/python-units-quantities-packages - astropy looks best to our understanding but sympy would integrated nicer without an additional package. diff --git a/tfields/core.py b/tfields/core.py index 9dc9fec..f951c6a 100644 --- a/tfields/core.py +++ b/tfields/core.py @@ -713,7 +713,10 @@ class Tensors(AbstractNdarray): # pylint: disable=too-many-public-methods Args: path: see :meth:`Tensors.load` - set_header: if Treu, set the header list to the `name` attribute + set_header: if True, set the header to the `name` attribute + (the type of the name attribute will be a list of strings + (header separated by delimiter) + ) **loadkwargs: see :meth:`np.loadtxt` """ load_txt_keys = [ diff --git a/tfields/mesh_3d.py b/tfields/mesh_3d.py index d0bdde1..3e65808 100644 --- a/tfields/mesh_3d.py +++ b/tfields/mesh_3d.py @@ -468,11 +468,11 @@ class Mesh3D(tfields.TensorMaps): indices = [0, -1] coords = range(3) - baseLengthsAbove1 = [len(b) > 1 for b in base_vectors] + base_lengths_above_1 = [len(b) > 1 for b in base_vectors] # if one plane is given: rearrange indices and coords - if not all(baseLengthsAbove1): + if not all(base_lengths_above_1): indices = [0] - for i, b in enumerate(baseLengthsAbove1): + for i, b in enumerate(base_lengths_above_1): if not b: coords = [i] break -- GitLab