CLyther for NumPy Users — Clyther 0.2.0-beta documentation

### Navigation

- index
- modules |
- next |
- previous |
- Clyther 0.2.0-beta documentation »

# CLyther for NumPy Users

simple numpy script:

    import numpy as np

    a = np.arange(12, dtype='f')
    b = np.arange(12, dtype='f').reshape([12,1])

    c = a + b

    assert c.shape == (12, 12)

    assert np.sum(c).item() == 1584.0

simple clyther script:

    from clyther.array import CLArrayContext

    np = CLArrayContext()

    a = np.arange(12, dtype='f')
    b = np.arange(12, dtype='f').reshape([12,1])

    c = a + b

    assert c.shape == (12, 12)

    assert np.sum(c).item() == 1584.0

### Navigation

- index
- modules |
- next |
- previous |
- Clyther 0.2.0-beta documentation »