From 608c5676d239539614a5d93633b2123dc280ef82 Mon Sep 17 00:00:00 2001 From: Stefano Roberto Soleti Date: Thu, 4 Mar 2021 12:06:35 -0800 Subject: [PATCH] Moving import inside function This is to have working GitHub actions --- larndsim/fee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/larndsim/fee.py b/larndsim/fee.py index 0f586951..9ab03b16 100644 --- a/larndsim/fee.py +++ b/larndsim/fee.py @@ -3,7 +3,6 @@ """ import numpy as np -import cupy as cp import h5py from numba import cuda @@ -146,6 +145,7 @@ def digitize(integral_list): Returns: numpy.ndarray: list of ADC values for each pixel """ + import cupy as cp xp = cp.get_array_module(integral_list) adcs = xp.minimum(xp.floor(xp.maximum((integral_list*GAIN/consts.e_charge+V_PEDESTAL - V_CM), 0) \ * ADC_COUNTS/(V_REF-V_CM)), ADC_COUNTS)