Skip to main content
https://travis-ci.org/sonofeft/M_Pool.svg?branch=master https://img.shields.io/pypi/v/M_Pool.svg https://img.shields.io/badge/python-3.6|3.7-blue https://img.shields.io/pypi/l/M_Pool.svg

A Wrapper For Numpy Arrays

Provides Named Axes, Interpolation, Iteration, Disk Persistence And Numerical Calcs

See the Code at: https://github.com/sonofeft/M_Pool

See the Docs at: http://m_pool.readthedocs.org/en/latest/

See PyPI page at:https://pypi.python.org/pypi/m_pool

M_Pool wraps multidimensional numpy arrays to provide the following features:

#. MatrixPool objects contain related Axis and Matrix objects

    - MP = MatrixPool(name='N2O4_MMH')



#. Axis objects are added by name and interpolation transform (used to linearize interpolation)

    - epsAxis = Axis({'name':'eps', 'valueL':[10., 20., 30., 40., 50.], 'units':'', 'transform':'log10'})

    - pcAxis = Axis({'name':'pc', 'valueL':[100.,200.,300,400], 'units':'psia', 'transform':'log10'})

    - mrAxis = Axis({'name':'mr', 'valueL':[1,2,3], 'units':'', 'transform':''})



#. Matrix objects added by name

    - M = MP.add_matrix( name='cea_isp', units='sec', axisNameL=['eps','pc','mr'] )



#. Find interpolated minimum or maximum

    - interpD, max_val = M.solve_interp_max( order=3, method='TNC', tol=1.0E-8)

        - where interpD and max_val look something like:

        - interpD = {'pc': 225.00641803120988, 'eps': 34.991495018803455, 'mr': 1.7499612975876655}

        - max_val = -0.000155216246295



#. Disk-based persistence

    - Save to pickle or hdf5 file

        - MP.save_to_pickle() # saves MP to "N2O4_MMH_matrix.pool"



#. Built-in statistics (standard deviation, median, mean/average, sum, minimum, maximum

    - M.get_range()

    - M.get_ave()

    - M.get_mean()

    - M.get_std()

    - M.get_median()



#. Interpolation on axes with named values

    - interp_val = M.interp(order=2, pc=100, eps=20, mr=2.0)

    - Uses transformed axes to help linearize interpolation



#. Iterate over matrix

    - for indeces,D,val in M.full_iter_items():

        - gives something like:

        - (0, 0, 0) {'pc': 100.0, 'eps': 10.0, 'mr': 1.0} 111.0

        - (0, 0, 1) {'pc': 100.0, 'eps': 10.0, 'mr': 2.0} 112.0

        - (0, 0, 2) {'pc': 100.0, 'eps': 10.0, 'mr': 3.0} 113.0

        - ...

Keywords: m_pool setuptools development Platform: any Classifier: Development Status :: 3 - Alpha Classifier: Operating System :: OS Independent Classifier: Intended Audience :: Developers Classifier: Intended Audience :: End Users/Desktop Classifier: Topic :: Software Development :: Build Tools Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Provides-Extra: dev Provides-Extra: test

Metadata

Release files for m-pool 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m-pool 0.0.5
File Size Uploaded
m_pool-0.0.5.tar.gz 4.3 MB Details

Release files / m_pool-0.0.5.tar.gz

Download URL m_pool-0.0.5.tar.gz
Size 4.3 MB
Tags Source
SHA-256 checksum
How to use checksums
3ef7efcc18310bc5e30f14902677bb0e2c19ed33b1f333e93580a01753b38a1c
BLAKE2b-256 checksum
How to use checksums
d4f7ccf4be80775700941156c9b7243684f1659783dcbf925c97847e377ad3ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page