Missing save_array function? SOLVED

In the cats/dogs redux notebook these functions are missing:

import bcolz
def save_array(fname, arr): c=bcolz.carray(arr, rootdir=fname, mode=‘w’); c.flush()
def load_array(fname): return bcolz.open(fname)[:]

I’m thinking a clean simple notebook is required that runs the training then runs test and saves the output for the kaggle competition would be helpful. I was trying to go thru lesson 1 to get the fit and predict/test methods completed. Also the test pics have to be in an additional directory eg ‘unknown’

from utils import *

check utils.py, if you don’t have it, check course repo and git clone the whole thing

def save_array(fname, arr):
c=bcolz.carray(arr, rootdir=fname, mode=‘w’)
c.flush()

def load_array(fname):
return bcolz.open(fname)[:]

2 Likes

I mean those functions are not int the redux notebook on github so when they are called it fails without the functions defined as I posted

@Will as @xinxin.li.seattle mentions, it doesn’t fail if you import them from utils.py as Jeremy does… in the notebook you mention in line: from utils import *

1 Like

ahh okay thanks