renard
The Renard series are a system of preferred numbers used in engineering applications which specify a geometric sequence of numbers over the range one to ten. The numbers are selected to be convenient to use and to minimise the maximum relative error when an arbitrary number is replaced by the nearest Renard number. The series were proposed by the French army engineer Colonel Charles Renard and subsequently standardised in ISO 3-1973.
For example, the R5 series contains six values (1.0, 1.6, 2.5, 4.0, 6.3) which cover a single order-of-magnitude range of values (one decade) from one to ten. These base values repeat again to cover the next decade from 10 to 100, as 10, 16, 25, 40, and 63.
This renard library is useful for selecting values from the least rounded R5, R10, R20, R40 and R80 decades, the medium rounded RR10, RR20 and RR40 decades, and the most rounded RRR5, RRR10 and RRR20 decades.
Status
Installation
The renard package is available on the Python Package Index (PyPI):
The package supports Python 3 only. To install:
$ pip install renard
Python Interface
For full help:
>>> import renard >>> help(renard)
In the meantime, here are some highlights.
To find the nearest R20 value to 319 use:
>>> from renard import find_nearest, R20 >>> find_nearest(R20, 319) 315.0
To find the next value greater-than or equal-to 182 in the R80 series use:
>>> from renard import find_greater_than_or_equal, R80 >>> find_greater_than_or_equal(R80, 182) 185.0
To find a few values around the specified value, use:
>>> from renard import find_nearest_few, R20 >>> find_nearest_few(R20, 5000) (4500.0, 5000.0, 5600.0)
Command-Line Interface
There’s also a handy command-line interface. Run renard --help to see a list of commands:
$ renard --help renard Usage: renard [options] <command> [<args> ...] Options: -h --help Show this screen. -v --verbose Use verbose logging Available commands: ge gt help le lt nearby nearest range series precision See 'renard help <command>' for help on specific commands.
To find a nearby value, use:
$ renard nearest R20 37726 35.5e3
If you prefer an SI exponent symbol, supply --symbol or -s:
$ renard nearest R20 37726 -s 35.5 k
To show values around the given value, use the nearby command:
$ renard nearby R40 52e6 -s 50 M 53 M 56 M
To show the smallest value greater than or equal to the given value, use the ge command:
$ renard ge R40 52e3 -s 53 k
To show all values in an inclusive range, use the range command:
$ renard range R5 74e-9 34e-6 -s 100 n 160 n 250 n 400 n 630 n 1 µ 1.6 µ 2.5 µ 4 µ 6.3 µ 10 µ 16 µ 25 µ
To use the most-rounded Renard R”20 series (for syntactic reasons, R’20 is called RR20 and R” is called RRR20 on the command line):
$ renard range RRR20 10000 20000 10e3 11e3 12e3 14e3 16e3 18e3 20e3
To determine the multiple to which the base values of a series have been rounded, use the precision command:
$ renard precision R5 0.01
Metadata
Release files for renard 1.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| renard-1.3.13.tar.gz | 13.5 kB | Without provenance | Details for renard-1.3.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| renard-1.3.13-py3-none-any.whl | Python 3 | none | any | Details for renard-1.3.13-py3-none-any.whl |
Total release size: 23.5 kB
Release files / renard-1.3.13.tar.gz
| Download URL | renard-1.3.13.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70eb47cad936df775ac96aba28cc6800848d4ac22b4e0ec9be9cd2e3fa297449
|
|
BLAKE2b-256 checksum How to use checksums |
780e463b4ad44aaae6bfd293c669d16426d54df341c40b4007a458f2c7485d6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / renard-1.3.13-py3-none-any.whl
| Download URL | renard-1.3.13-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9555349a0e351fa2d4b1984c3fb6ff4b0980e8a156f9f253b86900603690a1bd
|
|
BLAKE2b-256 checksum How to use checksums |
299969f81a0407503905ed04f7c1a2e53ccd11372aeb3c9ae8e530dac2e21e06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for renard 1.3.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.