-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Doc-Pilot | ||
on: [push, pull_request, workflow_dispatch, workflow_call] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
add-docstring: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ ${{ github.event.repository.name }} | ||
uses: actions/checkout@v4 | ||
with: | ||
path: DoCPilot | ||
persist-credentials: false | ||
submodules: "recursive" | ||
set-safe-directory: false | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: lots0logs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN}} | ||
|
||
- name: Run Claude Script | ||
run: | | ||
echo "steps.changed-files.outputs.all" | ||
echo "claude magic" | ||
- name: Cleanup Process | ||
run: | | ||
echo "We have now run cleanup" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# global | ||
from numbers import Number | ||
import numpy as np | ||
from typing import Union, Optional, List, Sequence, Tuple | ||
|
||
import jax.dlpack | ||
import jax.numpy as jnp | ||
import jax._src as _src | ||
import jaxlib.xla_extension | ||
|
||
# local | ||
import ivy | ||
from ivy import as_native_dtype | ||
from ivy.functional.backends.jax import JaxArray | ||
from ivy.functional.ivy.creation import ( | ||
_asarray_to_native_arrays_and_back, | ||
_asarray_infer_device, | ||
_asarray_infer_dtype, | ||
_asarray_handle_nestable, | ||
NestedSequence, | ||
SupportsBufferProtocol, | ||
_asarray_inputs_to_native_shapes, | ||
) | ||
|
||
|
||
# Array API Standard # | ||
# ------------------ # | ||
|
||
@_asarray_to_native_arrays_and_back | ||
@_asarray_infer_device | ||
@_asarray_handle_nestable | ||
@_asarray_inputs_to_native_shapes | ||
@_asarray_infer_dtype | ||
def asarray( | ||
obj: Union[ | ||
JaxArray, | ||
bool, | ||
int, | ||
float, | ||
tuple, | ||
NestedSequence, | ||
SupportsBufferProtocol, | ||
np.ndarray, | ||
], | ||
/, | ||
*, | ||
copy: Optional[bool] = None, | ||
dtype: Optional[jnp.dtype] = None, | ||
device: jaxlib.xla_extension.Device = None, | ||
out: Optional[JaxArray] = None, | ||
) -> JaxArray: | ||
ivy.utils.assertions._check_jax_x64_flag(dtype) | ||
if copy is True: | ||
return jnp.array(obj, dtype=dtype, copy=True) | ||
else: | ||
return jnp.asarray(obj, dtype=dtype) |