You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/10 02:04:00 UTC

[jira] [Updated] (ARROW-4388) [Go] add DimNames() method to tensor Interface?

     [ https://issues.apache.org/jira/browse/ARROW-4388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-4388:
----------------------------------
    Labels: easyfix pull-request-available  (was: easyfix)

> [Go] add DimNames() method to tensor Interface?
> -----------------------------------------------
>
>                 Key: ARROW-4388
>                 URL: https://issues.apache.org/jira/browse/ARROW-4388
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Go
>    Affects Versions: 0.12.0
>            Reporter: Randall O'Reilly
>            Priority: Major
>              Labels: easyfix, pull-request-available
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> It would be convenient to get access to the entire slice of dimension names via a DimNames() []string method, in addition to the existing DimName(i int) string method.  Here is a patch:
>  
> {{--- a/go/arrow/tensor/tensor.go}}
> {{+++ b/go/arrow/tensor/tensor.go}}
> {{@@ -52,6 +52,9 @@ type Interface interface {}}
> {{ // DimName returns the name of the i-th dimension.}}
> {{ DimName(i int) string}}
> {{+ // DimNames returns the full slice of dimension names.}}
> {{+ DimNames() []string}}
> {{+}}
> {{ DataType() arrow.DataType}}
> {{ Data() *array.Data}}
> {{@@ -102,6 +105,7 @@ func (tb *tensorBase) Shape() []int64 \{ return tb.shape }}}
> {{ func (tb *tensorBase) Strides() []int64 \{ return tb.strides }}}
> {{ func (tb *tensorBase) NumDims() int \{ return len(tb.shape) }}}
> {{ func (tb *tensorBase) DimName(i int) string \{ return tb.names[i] }}}
> {{+func (tb *tensorBase) DimNames() []string \{ return tb.names }}}
> {{ func (tb *tensorBase) DataType() arrow.DataType \{ return tb.dtype }}}
> {{ func (tb *tensorBase) Data() *array.Data \{ return tb.data }}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)