Skip to content

Commit

Permalink
black-reformatted before 0.1.5 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgandor committed Dec 31, 2020
1 parent f282166 commit b79925c
Show file tree
Hide file tree
Showing 13 changed files with 893 additions and 461 deletions.
6 changes: 3 additions & 3 deletions chunky3d/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = [
'Sparse',
'point_probe',
'Chunky',
"Sparse",
"point_probe",
"Chunky",
]

from .chunky import (
Expand Down
2 changes: 1 addition & 1 deletion chunky3d/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (0, 1, 5)
__version__ = '.'.join(map(str, version_info))
__version__ = ".".join(map(str, version_info))
12 changes: 4 additions & 8 deletions chunky3d/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def __new__(cls, input_array, origin=None, spacing=None):
def __array_finalize__(self, obj):
if obj is None:
return
self.origin = getattr(obj, 'origin', None)
self.spacing = getattr(obj, 'spacing', None)
self.origin = getattr(obj, "origin", None)
self.spacing = getattr(obj, "spacing", None)

@property
def spacing(self):
Expand All @@ -31,12 +31,8 @@ def origin(self, val):
self._origin = val

def to_dict(self):
return {
b'origin': self.origin,
b'spacing': self.spacing,
b'ndarray': self
}
return {b"origin": self.origin, b"spacing": self.spacing, b"ndarray": self}

@staticmethod
def from_dict(d):
return Chunk(d[b'ndarray'].copy(), origin=d[b'origin'], spacing=d[b'spacing'])
return Chunk(d[b"ndarray"].copy(), origin=d[b"origin"], spacing=d[b"spacing"])
Loading

0 comments on commit b79925c

Please sign in to comment.