Skip to content

Instantly share code, notes, and snippets.

@erykml
Created July 28, 2022 20:26
Show Gist options
  • Save erykml/a36deba8f57bb1fecf6feda2fb2fa405 to your computer and use it in GitHub Desktop.
Save erykml/a36deba8f57bb1fecf6feda2fb2fa405 to your computer and use it in GitHub Desktop.
def sin_transformer(period):
return FunctionTransformer(lambda x: np.sin(x / period * 2 * np.pi))
def cos_transformer(period):
return FunctionTransformer(lambda x: np.cos(x / period * 2 * np.pi))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment