-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Pr/floor underscore implementation #28923
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
base: main
Are you sure you want to change the base?
Pr/floor underscore implementation #28923
Conversation
…r frontends - Add tolist() instance method to JAX Array frontend class - Add tolist() instance method to TensorFlow EagerTensor frontend class - Both methods use ivy.to_list() for consistency with existing implementations - Add comprehensive test cases for both frontend implementations - Resolves issue ivy-llc#19170 The tolist method converts arrays/tensors to Python lists, providing compatibility with native framework APIs. This completes the tolist functionality across all major Ivy frontends (NumPy, PyTorch, TensorFlow, JAX, and Paddle). Co-authored-by: Kallal Mukherjee <[email protected]>
- Document that test_torch_avg_pool2d failure is unrelated to tolist implementation - Clarify that our tolist methods are working correctly and isolated - Provide analysis of the dtype issue in pooling functions - Confirm our changes are safe and follow established patterns
- Remove TEST_STATUS_NOTES.md file as requested - Remove docstrings from frontend methods following Ivy convention - Add min_value and max_value parameters to test cases to prevent overflow - Ensure tests work correctly with high number of examples (--num-examples 100) Thanks for the feedback @Sam-Armstrong! Ready for merge.
…ithub.com/7908837174/ivy-KALLAL into feature/implement-tolist-frontend-methods
…Py frontends - Add floor() and floor_() methods to TensorFlow EagerTensor frontend - Add floor() and floor_() methods to JAX Array frontend - Add floor() and floor_() methods to NumPy ndarray frontend - All floor_() methods are in-place operations using ivy.inplace_update - Add comprehensive test cases for all implementations - Resolves issue ivy-llc#21930 The floor_() method performs in-place floor operation on arrays/tensors, providing compatibility with native framework APIs. This completes the floor_ functionality across all major Ivy frontends. Co-authored-by: Kallal Mukherjee <[email protected]>
Hi @AnnaTz 👋, I’m deeply interested in contributing to the floor_ task (#21930), listed under Octernship #19178 and linked to PR #28923. I'd also like to formally apply for this project through the Git Octernship program. Could you please guide me on the application process for this specific Octernship? I’m eager to help develop and extend the Ivy frontend and commit to maintaining high standards of reproducibility and documentation throughout. Thanks so much, Kallal Mukherjee.. (7908837174).. |
Hey @7908837174, unfortunately the Octernship is no longer open, but we're still working on maintaining and improving ivy! Please can you resolve the merge conflicts here, then I'll review your PR. Thanks! |
Ok |
All fixed!
…On Wed, 23 Jul, 2025, 06:43 Sam Armstrong, ***@***.***> wrote:
*Sam-Armstrong* left a comment (ivy-llc/ivy#28923)
<#28923 (comment)>
Hey @7908837174 <https://github.com/7908837174>, unfortunately the
Octernship is no longer open, but we're still working on maintaining and
improving ivy! Please can you resolve the merge conflicts here, then I'll
review your PR. Thanks!
—
Reply to this email directly, view it on GitHub
<#28923 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLR2IIIMY3AKCS4ZTZGKOHT3J3ORZAVCNFSM6AAAAACCD3ADJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMBVGMYDANRTHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Complete File Changes
Frontend Implementation Files:
ivy/functional/frontends/tensorflow/tensor.py - Added floor methods
ivy/functional/frontends/jax/array.py - Added floor methods
ivy/functional/frontends/numpy/ndarray/ndarray.py - Added floor methods
Test Files:
ivy_tests/test_ivy/test_frontends/test_tensorflow/test_tensor.py - Added tests
ivy_tests/test_ivy/test_frontends/test_jax/test_array.py - Added tests
ivy_tests/test_ivy/test_frontends/test_numpy/test_ndarray/test_ndarray.py - Added tests
Usage Examples
Now users can do this across all frontends:
import ivy
TensorFlow usage
ivy.set_backend("tensorflow")
tf_tensor = ivy.array([1.7, 2.3, -1.2, -2.8])
result = tf_tensor.floor() # Returns [1.0, 2.0, -2.0, -3.0]
tf_tensor.floor_() # In-place: tensor becomes [1.0, 2.0, -2.0, -3.0]
JAX usage
ivy.set_backend("jax")
jax_array = ivy.array([1.7, 2.3, -1.2, -2.8])
result = jax_array.floor() # Returns [1.0, 2.0, -2.0, -3.0]
jax_array.floor_() # In-place: array becomes [1.0, 2.0, -2.0, -3.0]
NumPy usage
ivy.set_backend("numpy")
np_array = ivy.array([1.7, 2.3, -1.2, -2.8])
result = np_array.floor() # Returns [1.0, 2.0, -2.0, -3.0]
np_array.floor_()
# In-place: array becomes [1.0, 2.0, -2.0, -3.0]
Summary
This PR completely resolves issue #21930 by:
Adding missing floor() methods to TensorFlow, JAX, and NumPy frontends
Adding missing floor_() methods to TensorFlow, JAX, and NumPy frontends
Providing comprehensive test coverage for all new methods
Maintaining API consistency across all Ivy frontends
Following established patterns from existing implementations
Ensuring no breaking changes to existing functionality
Now Ivy users can confidently use floor operations across all supported backends without worrying about missing methods! 🚀
🔗 Closes
Closes #21930