## types.CompressedArrayTypeDecorator


Stores a NumPy array as zlib-compressed binary data in the DB.


Usage

``` python
types.CompressedArrayTypeDecorator(
    dtype=np.float64,
    *args,
    **kwargs,
)
```


Shape and dtype are preserved via the NumPy `.npy` format, so this works for arrays of any dimensionality (flat vectors, coordinate matrices, Hessians, …).


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Create the decorator, storing arrays as `dtype` (or as given if None). |
| [process_bind_param()](#process_bind_param) | Convert a NumPy array to zlib-compressed `.npy` bytes for the database. |
| [process_result_value()](#process_result_value) | Convert compressed `.npy` bytes from the database back to a NumPy array. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Create the decorator, storing arrays as `dtype` (or as given if None).


Usage

``` python
__init__(dtype=np.float64, *args, **kwargs)
```


------------------------------------------------------------------------


#### process_bind_param()


Convert a NumPy array to zlib-compressed `.npy` bytes for the database.


Usage

``` python
process_bind_param(value, dialect)
```


------------------------------------------------------------------------


#### process_result_value()


Convert compressed `.npy` bytes from the database back to a NumPy array.


Usage

``` python
process_result_value(value, dialect)
```
