Skip to content

lab-random-variable-distributions [ignaciolorenzo]#14

Open
ignaciolorenzo wants to merge 1 commit intoIronhack-Data-0621-Remote:masterfrom
ignaciolorenzo:master
Open

lab-random-variable-distributions [ignaciolorenzo]#14
ignaciolorenzo wants to merge 1 commit intoIronhack-Data-0621-Remote:masterfrom
ignaciolorenzo:master

Conversation

@ignaciolorenzo
Copy link
Copy Markdown

No description provided.

@ArabellaCM
Copy link
Copy Markdown

ArabellaCM commented Oct 19, 2021

Hi Ignacio! I had a look at this lab from a while ago. You had an error with your log transformations and maybe you fixed it at some point but I think it's a good test to check if you can see where it went wrong. Everything else was good :)

This is your function

def log_transfom(x):
    x = np.log(x)
    if np.isfinite(x):
        return np.log(x)
    else:
        return np.NAN
Check here for the solution!
def log_transfom(x):
    x = np.log(x)
    if np.isfinite(x):
        return x
    else:
        return np.NAN

You already applied log to "x" so you just want to return it as it is unless it's infinite in which case you want to return a NaN instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants