Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnList as a matrix #448

Open
tupui opened this issue Mar 2, 2022 · 0 comments
Open

ColumnList as a matrix #448

tupui opened this issue Mar 2, 2022 · 0 comments
Labels
enhancement New feature or request heavydb Related to heavydb server

Comments

@tupui
Copy link
Contributor

tupui commented Mar 2, 2022

It would be handy to be able access rows of multiple columns when indexing. This would allow to have a familiar interface for NumPy-like users.

@omnisci('UDTF(ColumnList<float>, OutputColumn<float>)')
def fahrenheit2celsius(inp, out):
    size = inp.size
    set_output_row_size(size)
    for i in range(size):
        out[i] = (array_api.mean(inp[i]) - 32) * 5 / 9
    return size

Here is the current error.

E                   numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E                   No implementation of function Function(<function _omnisci_array_mean at 0x108afa670>) found for signature:
E                    
E                    >>> _omnisci_array_mean(float32*)
E                    
E                   There are 2 candidate implementations:
E                       - Of which 2 did not match due to:
E                       Overload of function '_omnisci_array_mean': File: ../../../../../../../../../../Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/stdlib/statistical_functions.py: Line 121.
E                         With argument(s): '(float32*)':
E                        No match.
E                   
E                   During: resolving callee type: Function(<function _omnisci_array_mean at 0x108afa670>)
E                   During: typing of call at /Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/tests/test_TUTORIAL.py (278)
E                   
E                   
E                   File "test_TUTORIAL.py", line 278:
E                       def fahrenheit2celsius(inp, out):
E                           <source elided>
E                           for i in range(size):
E                               out[i] = (array_api.mean(inp[i]) - 32) * 5 / 9
E                               ^
@tupui tupui added enhancement New feature or request heavydb Related to heavydb server labels Mar 2, 2022
@guilhermeleobas guilhermeleobas changed the title ColomnList as a matrix ColumnList as a matrix Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request heavydb Related to heavydb server
Projects
None yet
Development

No branches or pull requests

1 participant