TensorBoolean.CreateFromArray(IIterable<Int64>, Boolean[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个布尔张量对象,分配大小 为形状的缓冲区,并将 所有数据 复制到其中。
public:
static TensorBoolean ^ CreateFromArray(IIterable<long long> ^ shape, Platform::Array <bool> ^ data);
static TensorBoolean CreateFromArray(IIterable<long> const& shape, winrt::array_view <bool> const& data);
public static TensorBoolean CreateFromArray(IEnumerable<long> shape, bool[] data);
function createFromArray(shape, data)
Public Shared Function CreateFromArray (shape As IEnumerable(Of Long), data As Boolean()) As TensorBoolean
参数
- shape
-
Windows.Foundation.Collections.IIterable
IIterable<long>
缓冲区的大小。
- data
-
Boolean[]
bool[]
要复制到缓冲区中的数据。
返回
具有包含给定数据的缓冲区的布尔张量对象。
注解
Windows Server
若要在 Windows Server 上使用此 API,必须使用带桌面体验的 Windows Server 2019。
线程安全
此 API 是线程安全的。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈