Range with float
Project description
English
forfloatrange is a Python library that provides a function called ffrange for generating a sequence of floating-point numbers within a specified range with a given step. The function verifies that the step is not zero to prevent errors and utilizes a generator expression for efficient handling of large value ranges.
Installation
You can install the library using pip:
pip install forfloatrange
Usage
from forfloatrange import ffrange
# Generate a sequence of floating-point numbers from 0.0 to 1.0 with a step of 0.1
for number in ffrange(0.0, 1.0, 0.1):
print(number)
Русский
forfloatrange - это библиотека на Python, предоставляющая функцию под названием ffrange для создания последовательности чисел с плавающей точкой в указанном диапазоне с заданным шагом. Функция проверяет, что шаг не равен нулю, чтобы избежать ошибок, и использует генераторное выражение для эффективной работы с большими диапазонами значений.
Установка
Вы можете установить библиотеку с помощью pip:
pip install forfloatrange
Пример использования
from forfloatrange import ffrange
# Сгенерировать последовательность чисел с плавающей точкой от 0.0 до 1.0 с шагом 0.1
for number in ffrange(0.0, 1.0, 0.1):
print(number)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forfloatrange-1.2.1.tar.gz.
File metadata
- Download URL: forfloatrange-1.2.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79665bb7fbdb36751a6996f25864914a1a0a2994a138e1f37c9fc88aa2236d3a
|
|
| MD5 |
11f75cb58a04529513dc6b6fbc3f3ed7
|
|
| BLAKE2b-256 |
7c5c032a9bf1c6a58b10d067f4c6b411fd7ca50a82c6ed20009a1e35f2f22ac6
|
File details
Details for the file forfloatrange-1.2.1-py3-none-any.whl.
File metadata
- Download URL: forfloatrange-1.2.1-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54ac242c616cf754f8380af5ae4b5625649906e4f301519438fe726315908b2d
|
|
| MD5 |
d02b335ef7d96c45dde60a5584bfb2e3
|
|
| BLAKE2b-256 |
74a99b983583f214055490b88aa56a5cd6d7dd3a2a3c67382fc810db383b43ab
|