Allow numpy numbers as comparisons, too

This commit is contained in:
Matthias
2020-08-26 07:16:29 +02:00
parent 21f4aba4e3
commit 9d4ecb625a
3 changed files with 19 additions and 3 deletions

View File

@@ -222,7 +222,7 @@ def crossed(series1, series2, direction=None):
if isinstance(series1, np.ndarray):
series1 = pd.Series(series1)
if isinstance(series2, (float, int, np.ndarray)):
if isinstance(series2, (float, int, np.ndarray, np.integer, np.floating)):
series2 = pd.Series(index=series1.index, data=series2)
if direction is None or direction == "above":