Skip to content

Commit

Permalink
fix: remove numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lundez committed Aug 2, 2023
1 parent af7b4c2 commit 63802ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solara/components/slider.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import math
import os
from datetime import date, datetime, timedelta
from typing import Callable, List, Optional, Tuple, TypeVar, Union, cast

import ipyvue
import ipyvuetify
import numpy as np
import reacton.core
import traitlets
from typing_extensions import Literal
Expand Down Expand Up @@ -65,7 +65,7 @@ def set_value_cast(value):
reactive_value.value = int(value)

if tick_labels == "end_points":
num_repeats = int(np.ceil((max - min) / step)) - 1
num_repeats = int(math.ceil((max - min) / step)) - 1
tick_labels = [str(min), *([None] * num_repeats), str(max)]

return rv.Slider(
Expand Down Expand Up @@ -133,7 +133,7 @@ def set_value_cast(value):
reactive_value.set((int(v1), int(v2)))

if tick_labels == "end_points":
num_repeats = int(np.ceil((max - min) / step)) - 1
num_repeats = int(math.ceil((max - min) / step)) - 1
tick_labels = [str(min), *([None] * num_repeats), str(max)]

return cast(
Expand Down Expand Up @@ -203,7 +203,7 @@ def set_value_cast(value):
reactive_value.set(float(value))

if tick_labels == "end_points":
num_repeats = int(np.ceil((max - min) / step)) - 1
num_repeats = int(math.ceil((max - min) / step)) - 1
tick_labels = [str(min), *([None] * num_repeats), str(max)]

return rv.Slider(
Expand Down Expand Up @@ -271,7 +271,7 @@ def set_value_cast(value):
reactive_value.set((float(v1), float(v2)))

if tick_labels == "end_points":
num_repeats = int(np.ceil((max - min) / step)) - 1
num_repeats = int(math.ceil((max - min) / step)) - 1
tick_labels = [str(min), *([None] * num_repeats), str(max)]

return cast(
Expand Down

0 comments on commit 63802ef

Please sign in to comment.