Commit bc6381f9 authored by dboe's avatar dboe
Browse files

blacked tfields

parent bd352e6e
Pipeline #84993 passed with stages
in 1 minute and 3 seconds
......@@ -10,7 +10,7 @@ contains numpy ndarray derived bases of the tfields package
Notes:
* It could be worthwhile concidering `np.li.mixins.NDArrayOperatorsMixin ...
<https://docs.scipy.org/doc/numpy-1.15.1/reference/generated/...
... numpy.lib.mixins.NDArrayOperatorsMixin.html>`_
... numpy.lib.mixins.NDArrayOperatorsMixin.html>`
"""
# builtin
import warnings
......@@ -305,9 +305,9 @@ class AbstractObject(object): # pylint: disable=useless-object-inheritance
bulk_type = bulk_type.decode("UTF-8")
bulk_type = getattr(tfields, bulk_type)
list_dict[key].append(
bulk_type._from_dict_legacy(
bulk_type._from_dict_legacy( # noqa: E501 pylint: disable=protected-access
**sub_dict[index]
) # noqa: E501 pylint: disable=protected-access
)
)
with cls._bypass_setters( # pylint: disable=protected-access,no-member
......@@ -1049,15 +1049,13 @@ class Tensors(AbstractNdarray): # pylint: disable=too-many-public-methods
>>> assert t_cyl[0, 0] == 3
"""
# scalars empty already there
if (
self.rank == 0
or self.shape[0] == 0
or self.coord_sys
== coord_sys # noqa: E501 pylint: disable=access-member-before-definition
):
if self.rank == 0 or self.shape[0] == 0:
# scalar or empty
self.coord_sys = coord_sys # pylint: disable=attribute-defined-outside-init
return
if self.coord_sys == coord_sys:
# already correct
return
tfields.bases.transform(self, self.coord_sys, coord_sys)
# self[:] = tfields.bases.transform(self, self.coord_sys, coord_sys)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment