mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 03:02:36 +08:00
5f190395ad
- Adds a new class, ``LabelArray``, which is a subclass of np.ndarray. LabelArray is conceptually similar to pandas.Categorical, in that it stores data with many duplicate values as indices into an array of unique values. For string data with many duplicates (e.g. time-series of tickers or or industry classifications), this provides multiple orders of magnitude of improvement when doing string operations, especially string comparison/matching operations. - Adds a new generic object "specialization" for `AdjustedArrayWindow`, and a corresponding ObjectOverwrite adjustment. - Adds a new ``postprocess`` method to ``zipline.pipeline.term.Term``. This method is called on the final result of any pipeline expression after screen filtering has occurred. The default implementation of ``postprocess`` is identity, but Classifier overrides it to coerce string columns into pandas.Categoricals before presenting them to the user.
8 lines
148 B
Cython
8 lines
148 B
Cython
"""
|
|
float specialization of AdjustedArrayWindow
|
|
"""
|
|
from numpy cimport float64_t
|
|
ctypedef float64_t[:, :] databuffer
|
|
|
|
include "_windowtemplate.pxi"
|