Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: typing for numpy as indices (#10014)

Dylan Madisettia0b996c22c1a
diff --git a/marimo/_plugins/ui/_impl/plotly.py b/marimo/_plugins/ui/_impl/plotly.py
index 73b1f127fc..bfdeff8228 100644
--- a/marimo/_plugins/ui/_impl/plotly.py
+++ b/marimo/_plugins/ui/_impl/plotly.py
@@ -1817,7 +1817,7 @@ def _extract_bars_numpy(
selected_indices = np.where(pos_mask)[0]
# Iterate only over selected indices
- for i in selected_indices:
+ for i in selected_indices.tolist():
if not _bar_value_in_selection_range(
trace, i, value_data[i], value_min, value_max
):
@@ -3564,11 +3564,9 @@ def _extract_funnel_stages_numpy(
val_mask = val_arr >= val_min
mask = cat_mask & val_mask
- for i in np.where(mask)[0]:
+ for i in np.where(mask)[0].tolist():
selected.append(
- _build_funnel_stage_point(
- trace, trace_idx, int(i), x_data, y_data
- )
+ _build_funnel_stage_point(trace, trace_idx, i, x_data, y_data)
)
return selected