Skip to main content

Utility Functions

Project description

ufns

Utility functions for Python

linspace(a, b, l, r)

  • generates a list of length l of evenly spaced values between a and b
  • rounds values to r decimal places, can be left blank if desired
  • leaving l blank will generate a values differing by 1 if the difference between a and b is whole, or else will set the length to 100

gen(l, a, b)

  • generates a list of length l of random integers between a and b

gen(l, list, allowDuplicates)

  • generates a list of length l of random values picked from an iterable (in this case the iterable is list)
  • iterable should not be passed as a string
  • setting allowDuplicates to False will populate the list with unique values, leaving blank or setting to True will add duplicate values to the list

lininc(a, b, i)

  • generates a list of values from a to b, in increments of i

ordmag(n)

  • returns the power that 10 is raised to when n is expressed in scientific notation

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

ufns-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ufns-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file ufns-0.0.1.tar.gz.

File metadata

  • Download URL: ufns-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ufns-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bd21ccb61f6a74d25e9766668264e1d6329351a767765341beffaa9bdc9d2a0a
MD5 798bac8fe13a63456b5ebf632ebe5929
BLAKE2b-256 800145ef19bb709d6d66ad89e6e8a52713b4eb665abd8f5de9abe23d546ea834

See more details on using hashes here.

File details

Details for the file ufns-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ufns-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ufns-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55b9c162ee204d150c9a4598045bfd7c461a6a85736ae4541f7f5b7b0272d3a4
MD5 9787d53261c4ee647c0f8a2106e51d7f
BLAKE2b-256 d89922f7068151d42400823b8c41b314720e68eebe7c91b8ceb1a52ea32412ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page