Skip to content

Commit

Permalink
Make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherioszisis committed Mar 25, 2024
1 parent dc78193 commit 0df50ff
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions atlas_densities/densities/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import numpy as np
import pandas as pd
from atlas_commons.typing import AnnotationT, BoolArray, FloatArray
from joblib import Parallel, delayed
from scipy.optimize import curve_fit
from tqdm import tqdm

Expand Down Expand Up @@ -283,9 +282,7 @@ def _compute_average_intensities_helper(index, gene_marker_volumes, id_):
if count <= 0:
continue

mean_density = (
index.ravel(intensity["intensity"])[voxel_ids][mask_voxels].sum() / count
)
mean_density = index.ravel(intensity["intensity"])[voxel_ids][mask_voxels].sum() / count

if mean_density == 0.0:
L.warning("Mean density for id=%s and marker=%s", id_, marker)
Expand Down Expand Up @@ -316,9 +313,7 @@ def __init__(self, values):
self._order = "C" if values.flags["C_CONTIGUOUS"] else "F"

values = values.ravel(order=self._order)
uniques, codes, counts = np.unique(
values, return_inverse=True, return_counts=True
)
uniques, codes, counts = np.unique(values, return_inverse=True, return_counts=True)

offsets = np.empty(len(counts) + 1, dtype=np.uint64)
offsets[0] = 0
Expand Down Expand Up @@ -349,9 +344,7 @@ def value_to_1d_indices(self, value):
return np.array([], dtype=np.uint64)

group_index = self._mapping[value]
return self._indices[
self._offsets[group_index] : self._offsets[group_index + 1]
]
return self._indices[self._offsets[group_index] : self._offsets[group_index + 1]]


def compute_average_intensities(
Expand Down

0 comments on commit 0df50ff

Please sign in to comment.