<filename>koreto/__init__.py
""" @xvdp """
import logging
from .version import __version__
WITH_TORCH = True
try:
    import torch
except:
    WITH_TORCH = False
    logging.warning("\033[93m\033[1mpytorch not found, only numpy functions loaded...\033[0m")

from .utils import DeepClone, deepclone, ObjDict, IPP
from .memory import ObjTrace, TraceMem, GPUse, CPUse, has_cuda
from .log import Col, PLog, sround, plotlog
from .scheduling import Schedule
from .grids import  mgrid, mgrid_pos, np_mgrid, np_mgrid_pos
from .rndm import unique_randint
from .lut import apply_cmap
from .fileio import get_files, get_images, rndlist, hash_file, hash_folder

if WITH_TORCH:
    from .camera import pixels_to_rays, rotate_rays, points_to_pixels, transform_points, Camera
    from .memory import memory_profiler

<filename>koreto/__init__.py
""" @xvdp """
import logging
from .version import __version__
WITH_TORCH = True
try:
    import torch
except:
    WITH_TORCH = False
    logging.warning("\033[93m\033[1mpytorch not found, only numpy functions loaded...\033[0m")

from .utils import DeepClone, deepclone, ObjDict, IPP
from .memory import ObjTrace, TraceMem, GPUse, CPUse, has_cuda
from .log import Col, PLog, sround, plotlog
from .scheduling import Schedule
from .grids import  mgrid, mgrid_pos, np_mgrid, np_mgrid_pos
from .rndm import unique_randint
from .lut import apply_cmap
from .fileio import get_files, get_images, rndlist, hash_file, hash_folder

if WITH_TORCH:
    from .camera import pixels_to_rays, rotate_rays, points_to_pixels, transform_points, Camera
    from .memory import memory_profiler
