Skip to main content

Pipes for humans.

Project description

y


This package brings Haskell's well-loved applicative functor interface to Python in the important special case of the identity applicative. This allows you to write code like the following:

from yproject import y
from matplotlib import pyplot as plt
import numpy as np

y / np.random.random([1000, 1000]) /\
    np.average @ {'axis': 0} /\
    plt.hist @ {'bins': 100, 'range': (0.45, 0.55)} %\
    np.reshape * (4, -1) /\
    np.average @ {'axis': 0} /\
    np.histogram @ {'bins': 100, 'range': (0.45, 0.55)} /\
    (lambda x: x[0]) /\
    np.multiply * 4 /\
    (lambda y, x: plt.plot(x, y)) * np.linspace(0.45, 0.55, 100) %\
    ...
plt.show()

demo

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

yproject-1.0.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

yproject-1.0.2-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

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