You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method as.matrix will convert a float32 vector into a float32 matrix.
However, as.matrix as used in other packages is meant to return a matrix object, which allows creating libraries that accept arbitrary objects from other packages without having to add them as dependencies - that is, one can create a library with a function that takes an input X, call as.matrix on it, and then pass it to a function that expects a matrix object, with the X potentially being a data.table, dgCMatrix, etc. (without adding dependencies on data.table or Matrix).
Would be nice if this package could follow this logic too, perhaps adding a different function as.float_matrix or the like that would do what as.matrix.float32 currently does.
The text was updated successfully, but these errors were encountered:
The method
as.matrix
will convert afloat32
vector into afloat32
matrix.However,
as.matrix
as used in other packages is meant to return amatrix
object, which allows creating libraries that accept arbitrary objects from other packages without having to add them as dependencies - that is, one can create a library with a function that takes an inputX
, callas.matrix
on it, and then pass it to a function that expects amatrix
object, with theX
potentially being adata.table
,dgCMatrix
, etc. (without adding dependencies ondata.table
orMatrix
).Would be nice if this package could follow this logic too, perhaps adding a different function
as.float_matrix
or the like that would do whatas.matrix.float32
currently does.The text was updated successfully, but these errors were encountered: