Array utility
A simple python utility library
What is PyArray ?
Well, PyArray is a simple python-array-utlity library. It contains a set of a array methods which can speed up your development.
How to use it?
Create a pyarray list
import pyarray
PyArray types
Strings
pyarray.string()
# strings
Integers
pyarray.integer()
# integer
Floats
pyarray.floating()
# floating point
Dictionaried , booleans and lists
#dictionaries
pyarray.dictionary()
#boolean values
pyarray.boolean()
# lists
pyarray.lists()
Create a list
arr = pyarray.List(pyarray.integer())
Methods
Length
arr.len()
Add
arr.add(4)
# The array don't support duplicate elements
# no element is added if it already exists
# int the list
elementAt(index:integer)
index = 1
arr.elementAt(index)
median
# find the median
# only for integers and floats
arr.median()
delete_index(index:integer)
arr.delete_index(-1)
search_insert_position
target = 9
arr.search_insert_postion(target)
index
arr.index()
peak
# the index of maximum element
arr.peak_index()
all
arr.all()
# returns all the element
count
arr.count(5)
Maximum and minimum
# maximum
arr.range().maximum()
# minimum
arr.range().minimum()
Choice
arr.choice()
# gives a random element
Other methods
# sort the array
arr.sort()
# find an element
arr.find()
# delete an element
arr.delete(3)
# clear all the element
arr.clear()
# reverse an array
arr.reverse()
arr.alternate_index()
Metadata
Release files for pyarray 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyarray-0.2.tar.gz | 3.3 kB | Details |
Release files / pyarray-0.2.tar.gz
| Download URL | pyarray-0.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e331e194fe8dbb7ba5fb3d6b5bb8236f76a377b22ca7faf4c86b8120fc45c0e0
|
|
BLAKE2b-256 checksum How to use checksums |
f4d746a1c521304b41f021745d2bc9e395ca2c6e01abda3148b5c97792252ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.7
|