-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected
Description
Streamlit version 0.55
Using something like the builtin max() or min() on a Numpy arrays will return int64 rather than int, which causes Streamlit to complain:
import streamlit as st
import numpy as np
n = np.array([1, 2, 3, 4, 5])
l = st.number_input(
min_value = min(n),
max_value = max(n),
value = 3,
label = "Length",
)
streamlit.errors.StreamlitAPIException: All arguments must be of the same type.
`value` has int type.
`min_value` has int64 type.
`max_value` has int64 type.
Ideally Streamlit should treat them the same, so the end user doesn't have to wrap everything with int() or the likes.
Metadata
Metadata
Assignees
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected