diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff0a19b..445ec9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8"] + python-version: ["3.10"] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -22,7 +22,7 @@ jobs: with: ref: ${{ github.ref }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -30,10 +30,9 @@ jobs: run: | python -m pip install poetry poetry config virtualenvs.in-project true - poetry config installer.modern-installation false - name: Cache the virtualenv - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ./.venv key: ${{ runner.os }}-test-${{ matrix.python-version }}-venv-${{ hashFiles('**/poetry.lock') }} diff --git a/cipher_parse/geometry.py b/cipher_parse/geometry.py index 5f1b035..aab1d04 100644 --- a/cipher_parse/geometry.py +++ b/cipher_parse/geometry.py @@ -70,7 +70,7 @@ def __init__( self.voxel_map = voxel_map self.voxel_phase = voxel_phase - self.seeds = np.asarray(seeds) + self.seeds = np.asarray(seeds) if seeds is not None else None self.materials = materials self.interfaces = interfaces self.random_seed = random_seed @@ -278,7 +278,7 @@ def to_JSON(self, keep_arrays=False): } if not keep_arrays: data["size"] = data["size"].tolist() - data["seeds"] = data["seeds"].tolist() + data["seeds"] = data["seeds"].tolist() if data["seeds"] is not None else None data["voxel_phase"] = data["voxel_phase"].tolist() if data["misorientation_matrix"] is not None: data["misorientation_matrix"] = data["misorientation_matrix"].tolist() @@ -299,7 +299,7 @@ def from_JSON(cls, data, quiet=True): "materials": [MaterialDefinition.from_JSON(i) for i in data["materials"]], "interfaces": [InterfaceDefinition.from_JSON(i) for i in data["interfaces"]], "size": np.array(data["size"]), - "seeds": np.array(data["seeds"]), + "seeds": np.array(data["seeds"]) if data["seeds"] is not None else None, "voxel_phase": np.array(data["voxel_phase"]), "is_periodic": data.get("is_periodic", False), "random_seed": data["random_seed"],