Skip to content

Commit 224c915

Browse files
committed
Added type defs
1 parent 664bb6c commit 224c915

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

  • src/fable-library-py/fable_library/core

src/fable-library-py/fable_library/core/array.pyi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@ class FSharpArray[T](MutableSequence[T]):
175175
) -> tuple[FSharpArray[T], FSharpArray[T]]: ...
176176
def permute(self, f: Callable[[Int32], SupportsInt], array: FSharpArray[T]) -> FSharpArray[T]: ...
177177
def pick[U](self, chooser: Callable[[T], Option[U]]) -> U: ...
178+
def random_choice(self) -> T: ...
179+
def random_choice_by(self, randomizer: Callable[[], float]) -> T: ...
180+
def random_choice_with(self, random: Any) -> T: ...
181+
def random_choices(self, count: int) -> FSharpArray[T]: ...
182+
def random_choices_by(self, randomizer: Callable[[], float], count: int) -> FSharpArray[T]: ...
183+
def random_choices_with(self, random: Any, count: int) -> FSharpArray[T]: ...
184+
def random_sample(self, count: int) -> FSharpArray[T]: ...
185+
def random_sample_by(self, randomizer: Callable[[], float], count: int) -> FSharpArray[T]: ...
186+
def random_sample_with(self, random: Any, count: int) -> FSharpArray[T]: ...
187+
def random_shuffle(self) -> FSharpArray[T]: ...
188+
def random_shuffle_by(self, randomizer: Callable[[], float]) -> FSharpArray[T]: ...
189+
def random_shuffle_in_place(self) -> None: ...
190+
def random_shuffle_in_place_by(self, randomizer: Callable[[], float]) -> None: ...
191+
def random_shuffle_in_place_with(self, random: Any) -> None: ...
192+
def random_shuffle_with(self, random: Any) -> FSharpArray[T]: ...
178193
def reduce(self, folder: Callable[[Any, Any], Any], state: Any) -> Any: ...
179194
def reduce_back(self, reduction: Callable[[Any, Any], Any], state: Any) -> Any: ...
180195
def remove_all_in_place(self, predicate: Callable[[T], bool]) -> SupportsInt: ...
@@ -368,6 +383,21 @@ def partition[T](
368383
) -> tuple[FSharpArray[T], FSharpArray[T]]: ...
369384
def permute[T](f: Callable[[Int32], SupportsInt], array: Elements[T]) -> FSharpArray[T]: ...
370385
def pick[T, U](chooser: Callable[[T], Option[U]], array: Elements[T]) -> U: ...
386+
def random_choice[T](xs: Elements[T]) -> T: ...
387+
def random_choice_by[T](randomizer: Callable[[], float], xs: Elements[T]) -> T: ...
388+
def random_choice_with[T](random: Any, xs: Elements[T]) -> T: ...
389+
def random_choices[T](count: int, xs: Elements[T]) -> FSharpArray[T]: ...
390+
def random_choices_by[T](randomizer: Callable[[], float], count: int, xs: Elements[T]) -> FSharpArray[T]: ...
391+
def random_choices_with[T](random: Any, count: int, xs: Elements[T]) -> FSharpArray[T]: ...
392+
def random_sample[T](count: int, xs: Elements[T]) -> FSharpArray[T]: ...
393+
def random_sample_by[T](randomizer: Callable[[], float], count: int, xs: Elements[T]) -> FSharpArray[T]: ...
394+
def random_sample_with[T](random: Any, count: int, xs: Elements[T]) -> FSharpArray[T]: ...
395+
def random_shuffle[T](xs: Elements[T]) -> FSharpArray[T]: ...
396+
def random_shuffle_by[T](randomizer: Callable[[], float], xs: Elements[T]) -> FSharpArray[T]: ...
397+
def random_shuffle_in_place[T](xs: FSharpArray[T]) -> None: ...
398+
def random_shuffle_in_place_by[T](randomizer: Callable[[], float], xs: FSharpArray[T]) -> None: ...
399+
def random_shuffle_in_place_with[T](random: Any, xs: FSharpArray[T]) -> None: ...
400+
def random_shuffle_with[T](random: Any, xs: Elements[T]) -> FSharpArray[T]: ...
371401
def reduce[T](reduction: Callable[[T, T], T], array: Elements[T]) -> T: ...
372402
def reduce_back[T](reduction: Callable[[T, T], T], array: Elements[T]) -> T: ...
373403
def remove_all_in_place[T](array: FSharpArray[T], predicate: Callable[[T], bool]) -> SupportsInt: ...

0 commit comments

Comments
 (0)