julia Questions
2
Solved
In Julia if I define an array with 1 column and n rows it appears to instantiate a "n-element array", I do not understand how this is different from a nx1 array:
julia> a = [1 2 3]
1x3 Array{In...
Pliant asked 16/1, 2014 at 1:56
2
Solved
Say I have
struct MyStruct{T,U}
a::T
b::U
end
I'd like to define a custom show which eliminates a lot of noise from the full type.
E.g. if I create the following:
z = MyStruct((a=1,b=2),rand(5))...
11
Solved
How can I get a list of imported/used packages of a Julia session?
Pkg.status() list all installed packages. I'm interested in the ones that that were imported/loaded via using ... or import ...
...
Mongolian asked 29/8, 2014 at 20:0
2
Solved
The 'xor'-operator in julia is defined by the following symbol: ⊻
If I am not mistaken this is also the only symbol representing 'xor'.
How are you supposed to type this conveniently?
Am I suppose...
2
Solved
I am trying to access some complex numbers I wrote to a csv file in julia but I'm having trouble getting it to recognize them. To understand what is happening, consider the following
a = [1+2.3im,...
2
Solved
With Julia 0.5 I was used to do this:
A = DataFrame(ID = [20,40], Name = ["John Doe", "Jane Doe"])
B = DataFrame(ID = [60,80], Job = ["Sailor", "Sommelier"])
C = DataFrame(Year = [1978, 1982], Tes...
Cazzie asked 26/7, 2018 at 17:17
2
Solved
Is there a simple way to change the fontsize of only (i.e., everything else should remain unchanged) the title in Plots.jl?
7
Solved
I'm working on Juno with Julia.
I don't know if Julia supports OOP or not.
For example, is there something like class or struct of c++?
How to declare it with members such as a data or a functio...
3
Solved
I have created a one-dimensional array(vector) in Julia, namely, a=[1, 2, 3, 4, 5]. Then I want to create a new vector b, where b has exactly same elements in a, i.e b=[1, 2, 3, 4, 5].
It seems t...
Whereinto asked 31/1, 2016 at 15:14
4
Solved
Is there a way to have the second dataset plot on a separate axis, overlaid on the first plot?
using Plots; gadfly(size=(800,400))
plot(Vector[randn(100)], line = ([:green], :step))
plot!(Vecto...
4
Solved
I use Mathematica for symbolic math calculations. I am planning to switch to another language. Matlab (which I use for standard computation stuff) includes this feature but I am looking at the poss...
Radon asked 1/7, 2015 at 8:3
3
Solved
Info:
$ julia --version
julia version 1.6.0
$ lscpu
~/root/MyPackage$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits vi...
Jollity asked 20/1, 2022 at 19:6
6
Is there a reasonably easy way to get data from some url? I tried the most obvious version, does not work:
readcsv("https://dl.dropboxusercontent.com/u/.../testdata.csv")
I did not find any usab...
Mccrea asked 15/6, 2014 at 13:18
2
Solved
When I tried to do:
d = {1:2, 3:10, 6:300, 2:1, 4:5}
I get the error:
syntax: { } vector syntax is discontinued
How to initialize a dictionary in Julia?
Bryanbryana asked 7/2, 2017 at 9:50
3
Solved
I have a very long DataArray of strings, and I would like to to generate a DataFrame in which one column is all the unique strings and the second is the number of occurrences. Right now I'm doing s...
Bailey asked 2/4, 2015 at 0:20
2
I want to access the last element of some array.
I am using length:
last_element = x[length(x)]
Is this correct? Is there a canonical way to access the last element of an ordered collection in ...
Franfranc asked 13/1, 2020 at 19:10
6
Solved
I often want to loop over a long array or column of a dataframe, and for each item, see if it is a member of another array. Rather than doing
giant_list = ["a", "c", "j"]
good_letters = ["a", "b"...
Misnomer asked 15/4, 2015 at 21:31
3
I was facing difficulty in converting dataframe to pdf file. I tried converting first to latex then to pdf, but the thing is I used latexify package to convert dataframe into latex format, but outp...
1
Solved
I have a DataFrame dfPaths as follows (I am using Julia)
I would like to define the column arc as the index of this dataFrame, so later I can use dfPaths[arc, "to"] to access the column ...
2
Solved
using DataFrames
df = DataFrame(a=1:3, b=1:3)
How do I create a new column c such that c = a+b element wise?
Can't figure it out by reading the transform doc.
I know that
df[!, :c] = df.a .+ df....
3
Solved
I'm running Julia on the raspberry pi 4. For what I'm doing, I need Julia 1.5 and thankfully there is a docker image of it here: https://github.com/Julia-Embedded/jlcross
My challenge is that, beca...
Odell asked 27/9, 2020 at 21:54
1
I have a large CSV file - almost 28 million rows and 57 columns - 8.21GB - the data is of different types - integers, strings, floats - but nothing unusual.
When I load it in Python/Pandas it takes...
Tetrad asked 20/8, 2020 at 11:42
2
Solved
I have a found a Julia function that nicely does the job I need.
How can I quickly integrate it to be able to call it from Python?
Suppose the function is
f(x,y) = 2x.+y
What is the best and most ...
Micrococcus asked 7/10, 2020 at 9:36
1
Consider the following code:
dog = (a=5, b=6, c=7)
frog = Dict(pairs(dog))
frog.keys
returns:
16-element Vector{Symbol}:
:a
:b
#undef
#undef
#undef
#undef
#undef
#undef
#undef
:c
#undef
...
Fa asked 16/2, 2023 at 18:30
0
I want to run julia functions/scripts from within python. I managed to call julia scripts via the library juliacall. Now I want to parallelize this. Therefore I created a python multiprocessing Poo...
Oria asked 14/2, 2023 at 17:18
© 2022 - 2024 — McMap. All rights reserved.