-
-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making sure behavior is consistent wrt Py2/Py3
Range returns an iterable in Python3. Making sure result is a list always. Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>
- Loading branch information
1 parent
5650dff
commit c838831
Showing
1 changed file
with
3 additions
and
3 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 |
---|---|---|
|
@@ -1194,10 +1194,10 @@ def _compute_baseline_hazard(self): | |
#### Utils #### | ||
def get_index(X): | ||
if isinstance(X, pd.DataFrame): | ||
index = list(X.index) | ||
index = list(X.index) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
else: | ||
# If it's not a dataframe, order is up to user | ||
index = range(X.shape[0]) | ||
# If it's not a dataframe, order is up to user | ||
index = list(range(X.shape[0])) | ||
This comment has been minimized.
Sorry, something went wrong.
spacecowboy
Author
Collaborator
|
||
return index | ||
|
||
|
||
|
Also fixed indentation to be a multiple of 4 (was 3)