Category "julia"

Concatenating arrays in Julia

If the two Int arrays are, a = [1;2;3] and b = [4;5;6], how do we concatenate the two arrays in both the dimensions? The expected outputs are, julia> out1

What is the difference between "==" and "===" comparison operators in Julia?

What is the difference between == and === comparison operators in Julia?

How to clear screen in Julia REPL on Windows

How do you clear screen while using Julia REPL, using ctrl +L just scrolls down enough for it to look clean, but the variables still hold the same value, is the

Julia: How do I create a macro that returns its argument?

My question is quite similar to this one, but with a difference. I want to create a macro (or whatever) that behaves this way: julia> @my-macro x + 2 :(x +

How do I check if a method exists for a particular type?

LATEST UPDATE: Shep has provided an answer that updates this question to v1+. UPDATE: Thanks to @rickhg12s for pointing out that it appears I may have stumbled

Julia is not giving me a good return value in Binary Search

I have made this recursive binary search function in Julia that will return the index where the number I am looking for is. (example: array = [1,2,4,8,16], key

Initialize a column with missing values and copy+transform another column of a dataframe into the initialized column

I have a messy column in a csv file (column A of the dataframe). using CSV, DataFrames df = DataFrame(A = ["1", "3", "-", "4", missing, "9"], B = ["M", "F", "R

How do I add and use MNIST in Julia 1.6.6?

The code for Mohammad Nauman's excellent book shows this (for Julia 1.5.3): using Flux, Statistics using Flux.Data.MNIST using Flux: onehotbatch Which fails u

Getting count of occurrences for X in string

Im looking for a function like Pythons "foobar, bar, foo".count("foo") Could not find any functions that seemed able to do this, in a obvious way. Looking fo

Pass result of Julia `download` to memory instead of file?

With Julia 1.6's download function, the typical behavior is to output to a file. How can I save the result directly to something in memory? E.g. I'd like someth

How to add latest Julia version to Jupyter Notebook

I installed Julia 1.5.3 on my Linux Mint 20 system. I copied the Julia files in julia-1.5.3-linux-x86_64.tar.gz to /opt/julia-1.5.3/, adjacent to the folder /o

Julia, handle keyboard interrupt

Title says it all. How can I handle or catch a SIGINT in julia? From the docs I assumed I just wanted to catch InterruptException using a try/catch block like t