Range with step of type float [duplicate] May 6, 2023 by Tarik You could use numpy.arange. EDIT: The docs prefer numpy.linspace. Thanks @Droogans for noticing =)