Skip to content

Commit

Permalink
Lintage.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Jul 11, 2024
1 parent 73e9629 commit dbb164a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions odc/geo/_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
def _find_common_type(array_types, scalar_type=None):
if scalar_type is None:
return np.result_type(*array_types)
else:
if np.issubdtype(scalar_type, np.floating):
array_types = array_types + [0.0]
elif np.issubdtype(scalar_type, np.complexfloating):
array_types = array_types + [0j]
return np.result_type(*array_types)

if np.issubdtype(scalar_type, np.floating):
array_types = array_types + [0.0]
elif np.issubdtype(scalar_type, np.complexfloating):
array_types = array_types + [0j]
return np.result_type(*array_types)


class BlockAssembler:
Expand Down Expand Up @@ -132,7 +132,6 @@ def extract(
dtype = self._dtype
if fill_value is not None:
# possibly upgrade to float based on fill_value
fill_dtype = np.min_scalar_type(fill_value)
dtype = _find_common_type([dtype], np.min_scalar_type(fill_value))
else:
dtype = np.dtype(dtype)
Expand Down

0 comments on commit dbb164a

Please sign in to comment.