Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Renamed resid methods to resdiuals #425

Merged
merged 13 commits into from
Jan 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions nistats/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

__docformat__ = 'restructuredtext en'

import warnings

import numpy as np

from nibabel.onetime import setattr_on_read
Expand Down Expand Up @@ -279,6 +281,15 @@ def __init__(self, theta, Y, model, wY, wresid, cov=None, dispersion=1.,

@setattr_on_read
def resid(self):
warnings.warn(FutureWarning,
"'RegressionResults.resid method has been deprecated "
"and will be removed. "
"Please use RegressionResults.residuals()'.")
return self.resdiuals()


@setattr_on_read
def residuals(self):
"""
Residuals from the fit.
"""
Expand Down Expand Up @@ -354,6 +365,13 @@ def logL(self, Y):
raise ValueError('can not use this method for simple results')

def resid(self, Y):
warnings.warn(FutureWarning,
"'SimpleRegressionResults.resid method has been deprecated "
"and will be removed. "
"Please use SimpleRegressionResults.residuals()'.")
return self.residuals(Y)

def residuals(self, Y):
"""
Residuals from the fit.
"""
Expand Down