Revert "Accept string for ArrayInterface constructor."

This reverts commit e8ecafb8dc.
This commit is contained in:
fis
2020-06-16 20:02:35 +08:00
parent e8ecafb8dc
commit 7c3a168ffd
4 changed files with 12 additions and 90 deletions

View File

@@ -182,13 +182,7 @@ Json RandomDataGenerator::ArrayInterfaceImpl(HostDeviceVector<float> *storage,
this->GenerateDense(storage);
Json array_interface {Object()};
array_interface["data"] = std::vector<Json>(2);
if (storage->DeviceCanRead()) {
array_interface["data"][0] =
Integer(reinterpret_cast<int64_t>(storage->ConstDevicePointer()));
} else {
array_interface["data"][0] =
Integer(reinterpret_cast<int64_t>(storage->ConstHostPointer()));
}
array_interface["data"][0] = Integer(reinterpret_cast<int64_t>(storage->DevicePointer()));
array_interface["data"][1] = Boolean(false);
array_interface["shape"] = std::vector<Json>(2);