Skip to content

Commit

Permalink
chnages to work with module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdocherty committed Jul 30, 2024
1 parent dbbc2f9 commit 9f0d3f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion representativity/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ def tpc_to_cls(tpc: np.ndarray, binary_image: np.ndarray) -> float:
# %% ======================== POST-CLS ERROR ESTIMATION ========================


def fit_to_errs_function(dim: int, n_voxels: int, a: float, b: float) -> float:
def fit_to_errs_function(
dim: int, n_voxels: int | np.ndarray, a: float, b: float
) -> float | np.ndarray:
return a / n_voxels**b


Expand Down
4 changes: 1 addition & 3 deletions representativity/util.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import numpy as np
import torch
import slicegan
from representativity import slicegan, core
from scipy import stats, ndimage
from matplotlib import pyplot as plt

import core


def load_generator(Project_path):
img_size, img_channels, scale_factor = 64, 1, 1
Expand Down

0 comments on commit 9f0d3f5

Please sign in to comment.