Skip to content

Commit

Permalink
Merge pull request #657 from gdalle/patch-1
Browse files Browse the repository at this point in the history
Replace pyjulia with juliacall in docs
  • Loading branch information
willow-ahrens authored Dec 12, 2024
2 parents eda9f55 + 7626d35 commit 98ba3ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/src/docs/language/benchmarking_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CurrentModule = Finch

# Benchmarking Tips

Julia code is [nototoriously
Julia code is [notoriously
fussy](https://github.com/JuliaCI/BenchmarkTools.jl#why-does-this-package-exist)
to benchmark.
We'll use [BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl)
Expand Down
17 changes: 12 additions & 5 deletions docs/src/docs/language/interoperability.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Using Finch with Other Languages

You can use Finch in other languages through interfaces like
[julia.h](https://docs.julialang.org/en/v1/manual/embedding/) or
[PyJulia](https://github.com/JuliaPy/pyjulia), but sparse arrays require special
## Python

Finch has a dedicated Python frontend which can be installed with `pip install finch-tensor`. The frontend is [Array-API](https://data-apis.org/array-api/latest/) compliant. The code for the python wrapper is available at the [finch-tensor-python](https://github.com/finch-tensor/finch-tensor-python) repo. Finch is also available as a backend to [pydata/sparse](https://sparse.pydata.org/en/stable/).

You can also use [juliacall](https://github.com/JuliaPy/PythonCall.jl) to access more advanced Finch features from Python.

## Other languages

You can use Finch in other languages using Julia interfaces such as
[julia.h](https://docs.julialang.org/en/v1/manual/embedding/), making
considerations for converting between 0-indexed and 1-indexed arrays.

## 0-Index Compatibility

Julia, Matlab, etc. index arrays [starting at
Julia, Matlab, Fortran, etc. index arrays [starting at
1](https://docs.julialang.org/en/v1/devdocs/offset-arrays/). C, python, etc.
index starting at 0. In a dense array, we can simply subtract one from the
index, and in fact, this is what Julia will does under the hood when you pass a
Expand Down Expand Up @@ -114,4 +121,4 @@ CIndex{Int64}(4)×3-Tensor
└─ [CIndex{Int64}(3)]: 5.5
```

We can also convert between representations by copying to or from `CIndex` fibers.
We can also convert between representations by copying to or from `CIndex` fibers.

0 comments on commit 98ba3ec

Please sign in to comment.