ENH: add Int64Overwrite and dispatching for it

BUG: column value should be float

DOC: update docs
This commit is contained in:
Maya Tydykov
2017-01-31 09:43:37 -05:00
parent 750837c5f8
commit 185e7a13f8
4 changed files with 52 additions and 4 deletions
+3
View File
@@ -25,6 +25,7 @@ from zipline.lib.adjustment import (
Float64Multiply,
Float64Overwrite,
Float641DArrayOverwrite,
Int64Overwrite,
ObjectOverwrite,
)
from zipline.lib.adjusted_array import AdjustedArray, NOMASK
@@ -235,6 +236,7 @@ def _gen_overwrite_adjustment_cases(dtype):
adjustment_type = {
float64_dtype: Float64Overwrite,
datetime64ns_dtype: Datetime64Overwrite,
int64_dtype: Int64Overwrite,
bytes_dtype: ObjectOverwrite,
unicode_dtype: ObjectOverwrite,
object_dtype: ObjectOverwrite,
@@ -585,6 +587,7 @@ class AdjustedArrayTestCase(TestCase):
@parameterized.expand(
chain(
_gen_overwrite_adjustment_cases(int64_dtype),
_gen_overwrite_adjustment_cases(float64_dtype),
_gen_overwrite_adjustment_cases(datetime64ns_dtype),
_gen_overwrite_1d_array_adjustment_case(float64_dtype),
+1 -2
View File
@@ -1534,7 +1534,7 @@ class BlazeToPipelineTestCase(WithAssetFinder, ZiplineTestCase):
pd.Timestamp('2014-01-04')
])
baseline = pd.DataFrame({
'value': (0, 1),
'value': (0., 1.),
'asof_date': base_dates,
'timestamp': base_dates,
})
@@ -1545,7 +1545,6 @@ class BlazeToPipelineTestCase(WithAssetFinder, ZiplineTestCase):
value=deltas.value + 10,
timestamp=deltas.timestamp + timedelta(days=1),
)
nassets = len(simple_asset_info)
expected_views = keymap(pd.Timestamp, {
'2014-01-03': np.array([[10.0],