renamed some things to avoid clashes with numpy array functions