Why Julia values types are inmutable?
In C#, you have structs, that are value types. Value types are types that are passed by value, and can be efficently inlined in stack for example. The more similar thing that I can see in Julia are...
View ArticleConverting an array of string types
Hi all, I am doing a small assignment project and this is the second time I am stuck. I have scrapped a website and got the data of the type stated below. Could some one please help me on how to...
View ArticleTry/Catch shortcut
Clarification: I’m looking for something similar to: condition ? a : b Except, my condition is when a returns some type of error, then do b instead of a. AZ(x)= try; sqrt(x); catch e; return...
View ArticleDynamic Imports and User Defined Interfaces in Julia
Hello! I am a newcomer to Julia and I am trying to recreate something that I worked a bit on in Python in Julia, because I think Julia will be the better language overall for numerical performance....
View ArticleMassive memory allocation on iterating algorithm `8.789115 seconds (26.65 M...
Hey everyone, I’ve written my first major algorithm in Julia which uses a Genetic Algorithm approach to finding a solution to the Travelling Salesman Problem. It works fine but next week I will be...
View ArticleConsistent patterns to convert types / find methods for a particular type?
I’ve done a fair amount of Julia programming and understand that “method” means something very different in Python vs Julia, however there are similarities too in that a method has type specificity...
View ArticleJoining two DataFrames (no common column)
I am trying to join two DataFrames with no matching columns. Screen Shot 2020-10-13 at 11.13.43 PM707×304 34.8 KB Screen Shot 2020-10-13 at 11.13.25 PM712×305 33.2 KB Please refer to the pics...
View ArticleHow to reproduce this example
How to reproduce this example in Julia reproducirJulia759×528 45.9 KB 4 posts - 2 participants Read full topic
View ArticleJulia kernel of Jupyter
I unintentionally removed Julia kernel from Jupyter note book. after that I tried the code ] build IJulia to get that kernel back to Jupyter but it did not worked out and the Julia kernel folder is...
View ArticleReverse a colormap in GRUtils.jl
I’m using GRUtils. How can I reverse a colormap in GR? I can’t grab cmap = colormap("jet") to flip it or something. The documentation says the colormap values can be retrieved… but doesn’t say how,...
View ArticleCxx/CxxWrap best practices examples
I am in the very early stages of porting a few libraries (all C++) to Julia. I’d like to have Julia wrappers of them first, but I have little experience in this area. Other than the examples in the...
View ArticleA* path on graph
Newly introduced to Julia, after working with slow graph libraries in Python. I’m trying to find the shortest path through a graph, constructed through an adjacency matrix using LightGraphs. Part of...
View ArticleHow to use colon based range syntax with other types?
Hi, I’m still making my first steps with Julia. I have the need for a Range type struct in my code. First I tried to use UnitRange{Int64}. Later I found out that for my needs some of the predefined...
View ArticleVcat vs push!, which one is more efficient
Hi everybody, I’m still a Julia newbie, so don’t be angry at me for silly questions. I’m wondering whenever I should use vcat or push! to append elements to arrays. For example, let’s say I have one...
View ArticleString interpolation in docstring
Hey community That’s probably a quick question. I’m writing docstrings and want to show an little example like """ f(s::String)::Nothing # Example for i in 1:10 f("i = $1") end """ function...
View ArticleNeed help fixing Gibbs Sampler using DArrays
Hi everyone, I’m giving a first steps demonstration to some colleagues. However, I am not an expert in Julia. I wanted to show a simple example of distributed computing with Julia. This is the example...
View ArticleCovariance from DataFrame or TimeArray
I have a large data set consisting of daily stock returns over 30 years and 7000 stocks. The time series do not align with each other across the set (i.e. dropmissing(data) returns no rows). If I...
View ArticleScikitLearn: how to import experimental estimator Histogram-Based Gradient...
How can I use the ScikitLearn’s experimental estimator “Histogram-Based Gradient Boosting” in Julia? According to the ScikitLearn Documentation, first from experimental one has to import...
View ArticleCan you remove an element from a multidimensal array?
Suppose if I had a 2 dimensional array: a = Int32[1 2 3 4; 5 6 7 8; 9 10 11 12] If I wanted to delete the first element in the second row, can I do that? I attempted to search for myself and I found...
View ArticleHow do I enable ANSI colored text output within Documenter.jl?
Hi, I’m currently developing a package in which coloring plays an important role. The HTML output of Documenter.jl writes raw ANSI escape codes for text output such as @example as shown in the upper...
View Article