#cross-entropy.py
# answer - https://classroom.udacity.com/nanodegrees/nd101/parts/94643112-2cab-46f8-a5be-1b6e4fa7a211/modules/4d61ad35-d227-460e-8be6-16407f273e7d/lessons/00912248-2445-4713-ad9c-76b8536e1959/concepts/760235e0-a3ec-4e56-8cdb-56d762886690#
import numpy as np
#%%
# Write a function that takes as input two lists Y, P,
# and returns the float corresponding to their cross-entropy.
def cross_entropy(Y,P):
    Y = np.float_(Y)
    P = np.float_(P)
    return -np.sum(Y * np.log(P) + (1 - Y) * np.log(1 - P))

cross_entropy([],[])

# %%
# natural logorithms

np.log(.999)
