Numpy Create Index Array Javascript Length