Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
juanep97 authored Dec 14, 2023
2 parents 7da7ee9 + 8e71d44 commit 74bfb61
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions mutis/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ class Signal:
"""

def __init__(self, times, values, dvalues=None, fgen=None):
self.times = np.array(times)
self.values = np.array(values)

if times.dtype is not np.float64:
log.warning('times.dtype not float64, which may cause erros when using numba, casting automatically.')

if values.dtype is not np.float64:
log.warning('values.dtype not float64, which It may cause erros when using numba, casting automatically.')

if dvalues.dtype is not np.float64:
log.warning('dvalues.dtype not float64, which may cause erros when using numba, casting automatically.')

self.times = np.array(times, dtype=np.float64)
self.values = np.array(values, dtype=np.float64)
self.fgen = fgen

self.dvalues = np.array(dvalues) if dvalues is not None else None
self.dvalues = np.array(dvalues, dtype=np.float64) if dvalues is not None else None
self.synth = None

# TODO make attributes below specific of OU method / not the entire class
Expand Down

0 comments on commit 74bfb61

Please sign in to comment.