Questions tagged [julia]

The Julia programming language is fast, expressive and dynamic. By aggressively targeting technical computing it has become a robust general purpose language. It addresses the two-language problem by combining the ease of use of high-level languages such as R and Python with the performance of C and Fortran.

Julia is a high-level, high-performance dynamic programming language for technical computing. It addresses the two-language problem by combining the ease of use of languages such as R and Python with the performance of C and Fortran. Julia provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. Environments such as Julia for VS Code, Jupyter, and Pluto provide a rich development environment with interactive graphics.

Community-contributed libraries continue to be added at a rapid pace. Programs written in Julia are organized around multiple dispatch - by defining and overloading functions with different combinations of argument types. Part of what makes Julia so expressive is that argument types can be user-defined, and user-defined types live in the same type hierarchy and have the same status as built-in types.

The Julia compiler includes a parser written in Scheme (femtolisp), some compiler passes and the runtime in C, code generation through LLVM using C++, and other compiler passes (type inference, inlining, etc.) as well as much of the Base library in Julia itself. For just-in-time generation of 64-bit or 32-bit optimized machine code the LLVM compiler framework is used.

Julia has foreign function interfaces for C, C++, Python, R, and Java, to name a few. Julia can also be embedded in any other software through its C API. Many of these interfaces are high performance and avoid copying data to the extent possible.

Resources for Julia:

Books

Publications

12250 questions
5
votes
1 answer

Julia 1.6: can't git clone using proxy (but git alone can) on Windows

I tried to use proxy configuration for faster connection on my git, my config was git config --global http.proxy socks5://127.0.0.1:1080, and it works fine with git. However, after applying this, my Julia package installation fails as…
Negrito
  • 220
  • 1
  • 9
5
votes
1 answer

Julia writing DataFrame to csv fails UndefRefError: access to undefined reference

So I simply want to write a DataFrame to a csv file (or xlsx). But after executing the code to populate the DataFrame and being able to see it in the console, I cannot save it. (neither to .csv or .xlsx with the CSV package or the xlsx package…
seulberg1
  • 955
  • 1
  • 7
  • 19
5
votes
2 answers

How to create a vector of missing values of certain length in julia?

In R I can create a vector length 5 with all NA_real_ values: x <- 1:5 length(x) ## [1] 5 rep(NA_real_, times = length(x)) ## [1] NA NA NA NA NA How can I do the same in julia? I can create a vector containing zeros, but I don't know how to put…
umair durrani
  • 5,597
  • 8
  • 45
  • 85
5
votes
1 answer

Variable Scope issue in Macro

I have a macro works if defined in main. macro check_set(d,v) nm = string(v) quote global $v if haskey($d,$nm) $v = $d[$nm] end end end However, when I put it inside a Module (macro defined inside the…
DomPazz
  • 12,415
  • 17
  • 23
5
votes
1 answer

In Julia, why use a Pair over a two element Tuple?

When should I use a Pair over a two element Tuple and vice versa?
Alec
  • 4,235
  • 1
  • 34
  • 46
5
votes
2 answers

Is there a Kronecker delta in Julia?

If I have some declared some Points in Julia (p_1,...,p_n). Is there some function or algorithm for kronecker delta (f_i(p_j)=1 if i=j and f_i(p_j)=0 if i != j) It would be very helpful. Thank you so much.
Tio Miserias
  • 485
  • 2
  • 8
5
votes
2 answers

Remove groups by condition

Suppose I have the following dataframe using DataFrames df = DataFrame(A = 1:10, B = ["a","a","b","b","b","c","c","c","c","d"]) grouped_df = groupby(df, "B") I would have four groups. How can I drop the groups that have fewer than, say, 2 rows?…
user1691278
  • 1,751
  • 1
  • 15
  • 20
5
votes
1 answer

Why does julia throw an LoadError in addition to the error I want to throw

If I write a script that does nothing else than throwing an error like this: throw(ErrorException("a useful message")) I get the following error when I execute the script. $ julia throwError.jl ERROR: LoadError: a useful message Stacktrace: [1]…
Jonas
  • 1,401
  • 9
  • 25
5
votes
2 answers

Shell wildcards don't work on Julia's shell mode

When running IPython I can run any shell command with an exclamation mark in front it: In [1]: !ls file1 file2 file3 file4 In [2]: !ls file* file1 file2 file3 file4 However, some things (in particular the use if wildcards) don't work on the…
TomCho
  • 3,204
  • 6
  • 32
  • 83
5
votes
1 answer

Julia SimpleHypergraphs - Hypernetx Error

I tried to compute a small example with the library SimpleHypergraphs. I followed the install instructions however, I have this error : ERROR: "HyperNetX is not installed in Python used by this Julia. Install HyperNetX and reload…
Samako
  • 53
  • 3
5
votes
1 answer

What makes Julia Composable?

I have seen many places the mention that Julia is "Composable". I know that the word itself means: Composability is a system design principle that deals with the inter-relationships of components. A highly composable system provides components that…
logankilpatrick
  • 13,148
  • 7
  • 44
  • 125
5
votes
1 answer

Apply multiple functions to a single column in Julia DataFrames.jl

I would like to easily apply multiple functions to a single column in a Julia dataframe. Here is a simple example from notebook 5 of the DataFrames.jl course on Julia Academy. Bogumil shows us to easily calculate the mean of the jumps column by…
jsinai
  • 93
  • 3
5
votes
1 answer

Calculating Hessian of a loss function including a NN w.r.t parameters in Julia using Zygote

How would you calculate a hessian of a loss function that consists of a Neural Network w.r.t. the NN's parameters? For instance, consider the loss function below using Flux: Chain, Dense, σ, crossentropy, params using Zygote model = Chain( x ->…
Miss Swiss
  • 89
  • 1
  • 9
5
votes
3 answers

Evaluate vectors or tuples in a function (julia)

I want to evaluate a set of vectors (or tuples) in a function $f$ but Julia says me that is imposible. For example: If I have an array of tuples p=[(1,1), (1,-1), (-1,1), (-1,-1)] and a function f(x,y)=x+y. I would like to calculate f(p[1]) =…
Tio Miserias
  • 485
  • 2
  • 8
5
votes
1 answer

The not operator (!) isn't working with array broadcasting

I am wondering why the not operator isn't working with array broadcasting/element-wise operations. For example, if I enter x = Array{Any}([1,2,3,4,missing,6]) !ismissing.(x) I get an error ERROR: MethodError: no method matching…
imantha
  • 2,676
  • 4
  • 23
  • 46
1 2 3
99
100