Datasets:
Download src/00004.py from BlazingCustoms/pybytecode-csn-3.12-licensed: direct link, hf CLI and curl.
- Browser
- Download file 635 Bytes
-
https://huggingface.co/datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/resolve/main/src/00004.py
- Command line
-
hf download hf://datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/src/00004.py
-
curl -L -o 00004.py https://huggingface.co/datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/resolve/main/src/00004.py
635 Bytes
| def __hi2lo_multiscale_indexes(self, mask, orig_shape): | |
| """pass""" | |
| mask_orig = zoom_to_shape(mask, orig_shape, dtype=np.int8) | |
| inds_small = np.arange(mask.size).reshape(mask.shape) | |
| inds_small_in_orig = zoom_to_shape(inds_small, orig_shape, dtype=np.int8) | |
| inds_orig = np.arange(np.prod(orig_shape)).reshape(orig_shape) | |
| inds_orig += np.max(inds_small_in_orig) + 1 | |
| inds_small_in_orig[mask_orig == True] = inds_orig[mask_orig == True] | |
| inds = inds_small_in_orig | |
| inds = relabel_squeeze(inds) | |
| logger.debug('Index after relabeling: %s', scipy.stats.describe(inds, axis=None)) | |
| return (inds, mask_orig) |