MethodError: Cannot `convert` an object of type Bool to an object of type String
@quantiota wrote: when running the 1300.Intro-to-Flux.jl.ipynb notebook from the julia academy course : Deep Learning with Flux i have this error at using CSV, DataFrames apples =...
View ArticleLooping over subset of array indices: Julia vs Python
@snowgum wrote: I am new to Julia and currently trying to emulate some practices I’m used to in Python. One problem I am struggling with is how to best iterate over some of the indices of an array....
View ArticleStruct & inner constructor
@BLI wrote: I’m trying to create a struct with an inner constructor to check some dimensions… Basic structure (let’s call it TEST) works: using Polynomials # struct TEST{T} N::Matrix{Poly{T}}...
View ArticleIJulia install stops for MbedTLS error
@ctkelley wrote: I’ve been having problems with IJulia (old notebooks not working) and have fixed this before with a rebuild of my .julia directory. When I do ]add IJulia everything seem to be fine...
View ArticleStarting a simple web server using HTTP.jl
@Jasper_Hall wrote: I am working through Adrian Salceanu’s book “Julia Programming Projects” and am having difficulties because the versions of modules he specifies in the book are not necessarily...
View ArticleStarting Scripts with multiple threads
@Impressium wrote: I read https://docs.julialang.org/en/v1/manual/parallel-computing/#Setup-1 and https://docs.julialang.org/en/v1/manual/getting-started/#man-getting-started-1 but can’t start Julia...
View ArticleFunction doesn't show result
@Jul wrote: Hello! I wrote little function but its not show output. I am fresh in this language and I’ve no idea why it’s not work. My input is : f(x->1) after that program freezes. This is...
View ArticleJLD/JLD2 and HDF5
@themadprogramer wrote: Hello, I noticed a few libraries were using the .jld2 extension which led me to discover https://github.com/JuliaIO/JLD2.jl which seems to be a native Julia implementation of...
View ArticleBest way to require exactly 1 of 2 keyword arguments when writing a function?
@Rainbow-Anthony_Lili wrote: (topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) Posts: 1 Participants: 1 Read full topic
View ArticleWhat is the best way to require exactly 1 of 2 keyword arguments when writing...
@Rainbow-Anthony_Lili wrote: I have a function “counts” that divides a sorted array of floats into subarrays based off a specified maximum value and an integer number of divisions, and then counts the...
View ArticleHow to access the end index of an array as attribute of a class
@QUANG_VU_NGUY_N_PH_M wrote: struct Test data::Vector{Int} end Base.getindex(test::Test, index) = test.data[index] Then, to get idex: test = Test([1,2,3]) I can get: test[1] test[2] How to get the...
View ArticleHow to show the pin symbol in PowerShell Julia?
@xiaodai wrote: I use Julia on Windows and when I open the REPL ti says that it’s been run in PowerShell. Once I pin a package, I expect the pin symbol to appear next to the package, but on my machine...
View ArticleHow to initialize an emty vector of Float64
@QUANG_VU_NGUY_N_PH_M wrote: struct A{T} time::Vector{Float64} data::Vector{T} end I would like to initialize an empty object of class A I tried with outer constructor as below A() = A([],[]) But it...
View ArticleOuter constructor
@QUANG_VU_NGUY_N_PH_M wrote: My struct definition: struct DiscreteField{T} time::Vector{Float64} data::Vector{T} end I would like to create an outer constructor: function...
View Article"command not found: julia" when running a UNIX executable
@themadprogramer wrote: Recently I’ve really been trying to get into Genie. To launch a Genie app, you either have to memorize a long command or just run one of 4 executables located in the bin...
View ArticleNon-friendly documentation
@Veenty wrote: Is it my idea or many libraries assume a huge amount of pre-knowledge in their documentation. For what I have seen until now, many libraries that are wrappers or reimplementation of...
View ArticleHow to calculate the the minimum value in a vector(array) of vectors
@robo360 wrote: I am trying to find the minimum on a vector of vectors. Is there an easy way of finding it? Thanks Posts: 8 Participants: 3 Read full topic
View ArticleGetting an error with the pgfplotsx backend for Plots.jl
@Volker wrote: Hi, I´m getting the following error, when I try to use Plots.jl with the pgfplots backend. julia> using Plots julia> pgfplotsx() ERROR: UndefVarError: pgfplotsx not defined Note:...
View ArticleHow to export a plot of Plots.jl with PGFPlotsX using font size and width of...
@Volker wrote: Hi, I already have exported one plot from Plots.jl with the backend PGFPlotsX using savefig and editing the font size and width manually, but I was wondering if is it possible to export...
View ArticleHow to optimize code without repeating similar part, based on the type of...
@QUANG_VU_NGUY_N_PH_M wrote: I have these 4 functions, which are almost similar. Based on the type of input argument, different Gaussline(i, j) will be given. Is there any way to shorten this code?...
View Article