Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Issue-3055-Remove-seed-parameter-from-SFrame-flat-map-method #3133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/python/turicreate/data_structures/sframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,7 @@ def apply(self, fn, dtype=None):
with cython_context():
return SArray(_proxy=self.__proxy__.transform(fn, dtype, seed))

def flat_map(self, column_names, fn, column_types="auto", seed=None):
def flat_map(self, column_names, fn, column_types="auto"):
"""
Map each row of the SFrame to multiple rows in a new SFrame via a
function.
Expand Down Expand Up @@ -2735,9 +2735,6 @@ def flat_map(self, column_names, fn, column_types="auto", seed=None):
input. If the types cannot be inferred from the first 10 rows, an
error is raised.

seed : int, optional
Used as the seed if a random number generator is included in `fn`.

Returns
-------
out : SFrame
Expand Down Expand Up @@ -2765,8 +2762,7 @@ def flat_map(self, column_names, fn, column_types="auto", seed=None):
[6 rows x 2 columns]
"""
assert callable(fn), "Input must be callable"
if seed is None:
seed = abs(hash("%0.20f" % time.time())) % (2 ** 31)
seed = abs(hash("%0.20f" % time.time())) % (2 ** 31)

# determine the column_types
if column_types == "auto":
Expand Down