Skip to content

Commit

Permalink
CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
SamStudio8 committed Aug 26, 2014
1 parent f4488e5 commit 147b2e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ History
* Introduced :class:`frontier.frame.DataFrame` which extends numpy's `ndarray`,
that will now be returned from :class:`frontier.frontier.Statplexer`'s API
functions that return read in data.
* :func:`frontier.frame.DataFrame.transform` takes a dictionary mapping
labels to a lambda function that will be applied to the corresponding
column of values in the DataFrame.
* :func:`frontier.frame.DataFrame.add_observation` stacks a new observation
array to the DataFrame.
* `_test_variance` function of the `Statplexer` will now test the range of variance
magnitudes across each parameter of read in data, issuing a warning and producing
a table if a magnitude difference greater than ±1 is discovered.
Expand Down
8 changes: 8 additions & 0 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,15 @@ def test_transform(self):
# Check nothing was transformed
self.assertEquals(frame[i, j], transformed_frame[i, j])

def test_bad_transform(self):
# Initialise data frame with trivial data
data = np.zeros([ARBITRARY_ROWS, len(TEST_PARAMETERS)])
frame = DataFrame(data, TEST_PARAMETERS)
for i in range(0, ARBITRARY_ROWS):
for j in range(0, len(TEST_PARAMETERS)):
data[i, j] = (i+1)*(j+1)

self.assertRaises(Exception, frame.transform, { TEST_PARAMETERS[0]: "hoot" })

if __name__ == '__main__':
unittest.main()

0 comments on commit 147b2e3

Please sign in to comment.