Learn R Programming

keras (version 2.0.6)

to_numpy_array: Convert to NumPy Array

Description

Convert an object to a NumPy array which has the optimal in-memory layout and floating point data type for the current Keras backend.

Usage

to_numpy_array(x, dtype = NULL, order = "C")

Arguments

x

Object or list of objects to convert

dtype

NumPy data type (e.g. float32, float64). If this is unspecified then R doubles will be converted to the default floating point type for the current Keras backend.

order

In-memory order ('C' or 'F'). Defaults to 'C', which is the optimal order in nearly every case for Keras backends.

Value

NumPy array with the specified type and order (or list of NumPy arrays if a list was passed for x).