将 MLMultiArray 转换为 C#/.Net 等价物?Xamarin IOS [英] Convert MLMultiArray to C#/.Net equivalent? Xamarin IOS

查看:30
本文介绍了将 MLMultiArray 转换为 C#/.Net 等价物?Xamarin IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的 MLMultiArray,我需要使用简单的 csharp/.net 类型,以便我可以与不使用 Xamarin IOS 类型的 Web 服务一起使用.

MLMultiArray below, I need this using simple csharp/.net types so I can use with web service which doesn't use Xamarin IOS types.

类型:MLMultiArray Final_heatmaps_0 {get;设置;}

Type: MLMultiArray Final_heatmaps_0 {get; set;}

用法:

MLMultiArray Final_heatmaps_0   {Float32 1 × 1 × 19 × 32 × 32 array}    
base    {Foundation.NSObject}   
ClassHandle 0x1fe40a010 
Shape   {System.nint[5]}    
[0] 1   
[1] 1   
[2] 19  
[3] 32  
[4] 32  
Static members      
Non-public members      
class_ptr   0x1fe40a010 
Non-public members      
_Shape  0x283ab5ec0 

这就是我想要做的

推荐答案

根据资料,显然Shape是一个nint列表.

According to the information , obviously Shape is a nint list .

所以直接用.Shape获取值.

MLMultiArray array = xxx;
nint[] data = array.Shape;

您可以在 csharp 中使用 data.

You can use data in csharp .

这篇关于将 MLMultiArray 转换为 C#/.Net 等价物?Xamarin IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆