Skip to content

Commit 490b889

Browse files
Addressing comments
1 parent 12d030b commit 490b889

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/ray/dataframe/dataframe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ def as_matrix(self, columns=None):
11981198
Returns:
11991199
values: ndarray
12001200
"""
1201+
# TODO this is very inneficient, also see __array__
12011202
return to_pandas(self).as_matrix(columns)
12021203

12031204
def asfreq(self, freq, method=None, how=None, normalize=False,
@@ -4595,8 +4596,8 @@ def __round__(self, decimals=0):
45954596
"github.com/ray-project/ray.")
45964597

45974598
def __array__(self, dtype=None):
4598-
# TODO: This is very inefficient and needs fix
4599-
return np.array(to_pandas(self))
4599+
# TODO: This is very inefficient and needs fix, also see as_matrix
4600+
return to_pandas(self).__array__(dtype=dtype)
46004601

46014602
def __array_wrap__(self, result, context=None):
46024603
raise NotImplementedError(

0 commit comments

Comments
 (0)