I know in python you can fill an array with 0's using numpy.zeroes(size)
but as part of learning I am asked to not use numpy
, so my question is, is there a way to fill an array without numpy.zeroes
function?
specificly How do I fill the following list with 0's in the following functions?
def myHistWithRescale(listOfNums, maxInt):
"""Givne a list of real numbers in any range, first scale the numbers to
inters between 0 and maxInt (inclusive), then return the number of occurrences
of each integer in a list
"""
rescaledData = rescaleToInt(listOfNums, maxInt)
return counts