-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ricequant/develop
Develop
- Loading branch information
Showing
4 changed files
with
58 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
# 详细的授权流程,请联系 [email protected] 获取。 | ||
|
||
import numpy as np | ||
import logging | ||
|
||
|
||
logger = logging.getLogger() | ||
|
||
|
||
class IndicatorProperty: | ||
|
@@ -78,3 +82,14 @@ def safe_div(dividend, divisor): | |
if divisor == 0: | ||
return np.nan | ||
return dividend / divisor | ||
|
||
|
||
def deprecate_property(func): | ||
|
||
@property | ||
def inner(self): | ||
logger.warning("\"{}\" is deprecate.".format(func.__name__)) | ||
return func(self) | ||
|
||
return inner | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
[metadata] | ||
name = rqrisk | ||
version = 1.0.5 | ||
version = 1.0.6 | ||
|
||
[versioneer] | ||
VCS = git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters