Should limit numpy requirement to <2 until this is fixed in each specification. Even at 1.26 it gives warnings
def evaluate(self, problem):
"""Return the sum of breaches extent for all windowed breaches."""
wstart, wend = self.location.start, self.location.end
sequence = self.location.extract_sequence(problem.sequence)
gc = gc_content(sequence, window_size=self.window)
breaches = np.maximum(0, self.mini - gc) + np.maximum(
0, gc - self.maxi
)
score = -breaches.sum()
> breaches_starts = wstart + (breaches > 0).nonzero()[0]
E ValueError: Calling nonzero on 0d arrays is not allowed. Use np.atleast_1d(scalar).nonzero() instead. If the context of this error is of the form `arr[nonzero(cond)]`, just use `arr[cond]`.
Should limit numpy requirement to <2 until this is fixed in each specification. Even at 1.26 it gives warnings