Skip to content

Conversation

@sakchal
Copy link
Contributor

@sakchal sakchal commented Mar 27, 2024

This PR introduces a directory of getting started examples taken from the old high-level python library to serve as examples in the new high-level python API.

This PR introduces new example files including:
convolve.py
intro.py

import sys
from array import array

# from time import time
Copy link
Collaborator

Choose a reason for hiding this comment

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

stray comment

h_spread = array("f", (1.0 / 5, 1.0 / 5, 1.0 / 5, 1.0 / 5, 1.0 / 5))

img = af.randu((640, 480))
dx = af.Array(obj=h_dx, shape=(5, 1))
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove obj= kwarg


print("\n---- Get minimum with index\n")
(min_val, min_idx) = af.imin(A, axis=0)
print(_array_as_str(min_val)) # type: ignore[arg-type]
Copy link
Collaborator

Choose a reason for hiding this comment

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

if imin is af.Array, can't we print it directly without _array_as_str?

@syurkevi syurkevi merged commit 6661cae into arrayfire:master Apr 15, 2024
edwinsolisf pushed a commit to edwinsolisf/arrayfire-py that referenced this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants