-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python, rust): Added pickle support.
chore(python): Fixed formatting. chore: Added changelog for rust package
- Loading branch information
Showing
8 changed files
with
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.3.1] - | ||
|
||
### Added | ||
|
||
- (#7) Added `PartialEq` derive macro to `Bocpd` and `Argpcpd` structs. |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "changepoint" | ||
version = "0.14.0" | ||
version = "0.14.1" | ||
authors = [ | ||
"Mike Schmidt <[email protected]>", | ||
"Baxter Eaves <[email protected]>", | ||
|
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Changelog | ||
|
||
## v0.3.1 | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.3.1] - | ||
- Added Pickle support for `ArgpCpd` and `Bocpd` | ||
- Fix type error that occurred converting numpy `bool_` and `int` types | ||
- Added default arguments `NormalInvChiSquared` constructor (`m=0, k=1, v=1, s2=1`) |
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from changepoint import Bocpd, ArgpCpd, NormalGamma | ||
import pickle | ||
|
||
|
||
def test_pickle_bocpd(): | ||
cpd = Bocpd(NormalGamma(), 12) | ||
s = pickle.dumps(cpd) | ||
cpd_b = pickle.loads(s) | ||
assert cpd == cpd_b | ||
|
||
|
||
def test_pickle_argpcpd(): | ||
cpd = ArgpCpd(logistic_hazard_h=-2, scale=3, noise_level=0.01) | ||
s = pickle.dumps(cpd) | ||
cpd_b = pickle.loads(s) | ||
assert cpd == cpd_b |