Bug 96787

Summary: TypeError: linspace() got an unexpected keyword argument 'dtype'
Product: piglit Reporter: Vinson Lee <vlee>
Component: testsAssignee: Piglit Mailing List <piglit>
Status: RESOLVED FIXED QA Contact: Piglit Mailing List <piglit>
Severity: normal    
Priority: medium CC: airlied, baker.dylan.c
Version: unspecifiedKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2016-07-02 20:51:48 UTC
piglit: 7a11be33e419b2fef53092a4ce88472ba89fbc38 (master)

Traceback (most recent call last):
  File "generated_tests/gen_builtin_uniform_tests.py", line 48, in <module>
    from builtin_function import *
  File "generated_tests/builtin_function.py", line 983, in <module>
    _make_componentwise_test_vectors(test_suite)
  File "generated_tests/builtin_function.py", line 960, in _make_componentwise_test_vectors
    f('abs', 1, 150, np.abs, None, [np.linspace(-10, 15, 5, dtype=np.dtype(np.int64))],
TypeError: linspace() got an unexpected keyword argument 'dtype'


commit 7a11be33e419b2fef53092a4ce88472ba89fbc38
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Jun 10 13:37:10 2016 +1000

    arb_gpu_shader_int64: add test generation to standard testing template

    Rather than forking this code further, I've just added support to the
    standard generator for the 64-bit tests.

    This relies on the shader_runner int64 support.

    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Comment 1 Vinson Lee 2016-07-02 22:40:40 UTC
Upgrading numpy to 1.9.0 fixes the build for me. numpy 1.8.2 still fails.
Comment 2 Vinson Lee 2016-07-05 00:12:27 UTC
commit b9767c8443c682f338cd5fa87e6a762bf9e1cea5
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jul 4 16:18:40 2016 +1000

    builtin_function: try and use casts for 64-bits instead of dtype setting.
    
    The dtype setting only works with numpy 1.9 and above, which doesn't
    seem to be in most distros yet.
    
    Reported-by: Jose Fonseca <jfonseca@vmware.com>
    Tested-by: Jose Fonseca <jfonseca@vmware.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.