Commit 16528828 authored by dboe's avatar dboe

creating parent directories on the fly in save

parent bd811843
Pipeline #84442 passed with stages
in 57 seconds
......@@ -29,7 +29,7 @@ before_script:
dist:
stage: build
script:
- mkdir -p .ache/apt
- mkdir -p .cache/apt
- apt-get update -yqq
- apt-get install -y gfortran libopenblas-dev liblapack-dev
- apt-get -o dir::cache::archives=".cache/apt" install -y -qq gfortran liblapack-dev libgmp-dev
......@@ -76,8 +76,7 @@ test:
script:
- pip --version
- pip install tox # you can also use tox
- rm -rf .tox
- tox --recreate
- tox
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
# paths:
......
......@@ -81,6 +81,7 @@ class AbstractObject(object):
)
path = rna.path.resolve(path)
rna.path.mkdir(path)
return save_method(path, **kwargs)
@classmethod
......@@ -455,9 +456,7 @@ class AbstractNdarray(np.ndarray, AbstractObject):
Counterpart to __reduce__. Important for unpickling.
"""
# Call the parent's __setstate__ with the other tuple elements.
super(AbstractNdarray, self).__setstate__(
state[0: -len(self._iter_slots())]
)
super(AbstractNdarray, self).__setstate__(state[0 : -len(self._iter_slots())])
# set the __slot__ attributes
valid_slot_attrs = list(self._iter_slots())
......@@ -1625,7 +1624,9 @@ find-ordered-vector-in-numpy-array
evalfs = evalfs[idx]
evecs = evecs[:, idx]
e = np.concatenate((evecs, evalfs.reshape(1, 3)))
return e.T.reshape(12,)
return e.T.reshape(
12,
)
def main_axes(self, weights=None):
"""
......@@ -2321,7 +2322,8 @@ class TensorMaps(TensorFields):
dim_maps = [dim_maps_dict[dimension][i] for i in range(len(objects))]
return_value = TensorFields.merged(
*dim_maps, return_templates=return_templates,
*dim_maps,
return_templates=return_templates,
)
if return_templates:
mp, dimension_map_templates = return_value
......
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