This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
def explode(frame: pd.DataFrame, columns: List[str]): | |
""" | |
This helper function explodes a new row | |
for each value in an array of values. | |
If there is more than one column to be exploded, | |
the array lengths must be the same (row-wise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from theano import function, printing, shared, tensor as T | |
PRINT = printing.Print('Theano shape: ', attrs=['shape']) | |
def example(): | |
array = np.ones((3, 4)) | |
print(f'Numpy shape: {array.shape}') | |