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

feat: implement real #23669

Closed
wants to merge 2 commits into from
Closed

Conversation

HadeerArafa
Copy link

@HadeerArafa HadeerArafa commented Sep 15, 2023

PR Description

Related Issue

Close #23624

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Socials:

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Compliance Checks Passed!

@HadeerArafa
Copy link
Author

HadeerArafa commented Sep 15, 2023

sometimes all the tests pass and other times I get this error
and I don't know why fn is sometime equal to ivy.array([]) instead of <function real at 0x...............>
do you have any ideas? @illia-bab @zhumakhan

backend_to_test = 'numpy', fn = ivy.array(0), test_compile = False
precision_mode = False, args = (), kwargs = {}

    def get_ret_and_flattened_np_array(
        backend_to_test: str, fn, *args, test_compile=False, precision_mode=False, **kwargs
    ):
        """
        Run func with args and kwargs.
    
        Return the result along with its flattened version.
        """
        fn = compiled_if_required(
            backend_to_test, fn, test_compile=test_compile, args=args, kwargs=kwargs
        )
        with BackendHandler.update_backend(backend_to_test) as ivy_backend:
            with ivy_backend.PreciseMode(precision_mode):
>               ret = fn(*args, **kwargs)
E               TypeError: 'Array' object is not callable
E               Falsifying example: test_real(
E                   backend_fw='numpy',
E                   on_device='cpu',
E                   dtype_and_x=(['int64'], [array(0, dtype=int64)]),
E                   test_flags=FunctionTestFlags(
E                       ground_truth_backend='tensorflow',
E                       num_positional_args=1,
E                       with_out=False,
E                       instance_method=True,
E                       test_gradients=False,
E                       test_compile=False,
E                       as_variable=[False],
E                       native_arrays=[False],
E                       container=[False],
E                       precision_mode=False,
E                   ),
E                   fn_name='real',
E               )

@ivy-leaves ivy-leaves added Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request PaddlePaddle Backend Developing the Paddle Paddle Backend. Ivy Functional API labels Sep 15, 2023
@HadeerArafa HadeerArafa changed the title real feat: implement real Sep 15, 2023
@ivy-seed ivy-seed assigned zhumakhan and unassigned illia-bab Sep 16, 2023
@ivy-seed ivy-seed added the Stale label Oct 13, 2023
@github-actions
Copy link
Contributor

Thank you for this PR, here is the CI results:


This pull request does not result in any additional test failures. Congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request Ivy Functional API PaddlePaddle Backend Developing the Paddle Paddle Backend. Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

real
6 participants