Convert frame into a 2D numpy array, optionally forcing it into the specified type.
In a limited set of circumstances the returned numpy array will be created as a data view, avoiding copying the data. This happens if all of these conditions are met:
the frame has only one column, which is not virtual;
the column’s type is not string;
typeargument was not used.
In all other cases the returned numpy array will have a copy of the frame’s data. If the frame has multiple columns of different stypes, then the values will be upcasted into the smallest common stype.
If the frame has any NA values, then the returned numpy array will
be an instance of
Cast frame into this type before converting it into a numpy
array. Here “type-like” can be any value that is acceptable to the
Convert a single column instead of the whole frame. This column index can be negative, indicating columns counted from the end of the frame.
False, the resulting numpy array will have the same memory
layout as the datatable frame, i.e. column-major or
True, the numpy array will be row-major or
A masked array is returned if the frame contains NA values but the corresponding numpy array does not support NAs.
numpy module is not installed.