Skip to content

Conversation

chrisgorgo
Copy link
Member

No description provided.

timeseries_file -- text file with white space separated timepoints in rows

"""
with open(timeseries_file) as timeseries_file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use np.genfromtxt to read the file - will handle many more cases automatically

@satra
Copy link
Member

satra commented Jun 26, 2013

use http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.moment.html and make this more general purpose - you can always create helper classes if you want specific values of moment.

@chrisgorgo
Copy link
Member Author

Thanks. All should be fixed now.

f.write(data)
f.flush()
skewness = calc_moments(f.name, 3)
yield assert_equal, skewness, np.array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of assert_equal use assert_true with np.allclose - this is better for floating point computations

@chrisgorgo
Copy link
Member Author

Done.

satra added a commit that referenced this pull request Jun 27, 2013
@satra satra merged commit f87c476 into nipy:master Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants