# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1580

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1581

---

## [Argument which is an array of the same subtypes don't match array of super-type](https://discourse.julialang.org/t/argument-which-is-an-array-of-the-same-subtypes-dont-match-array-of-super-type/49712)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 7\
**Last updated:** [November 7, 2020, 6:44am UTC](https://discourse.julialang.org/t/argument-which-is-an-array-of-the-same-subtypes-dont-match-array-of-super-type/49712 "2020-11-07T06:44:39Z")

</div>

The short version is that a function typed as function x1(Array{SuperType,1}) will throw an error if an argument which is an array of only subtypes is passed but not if the array is composed of elements with a mix of s…

---

## [Memory efficient melting and stacking? Reshaping Wide to Long](https://discourse.julialang.org/t/memory-efficient-melting-and-stacking-reshaping-wide-to-long/49657)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 11\
**Last updated:** [November 7, 2020, 1:32am UTC](https://discourse.julialang.org/t/memory-efficient-melting-and-stacking-reshaping-wide-to-long/49657 "2020-11-07T01:32:37Z")

</div>

I need to reshape large dataframes from Wide to Long format. The input looks like this, with a unique ID per row, and multiple columns with a date in the name and multiple columns without the date. # R code my \<- data.…

---

## [How to get escaping in a custom string macro to work?](https://discourse.julialang.org/t/how-to-get-escaping-in-a-custom-string-macro-to-work/49709)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [November 7, 2020, 12:50am UTC](https://discourse.julialang.org/t/how-to-get-escaping-in-a-custom-string-macro-to-work/49709 "2020-11-07T00:50:35Z")

</div>

I have a little string macro as follows macro Q\_str(p) esc(:(println(Crayon(foreground = :light\_cyan ), $p))) end Basically I can just write Q""" This is a multi-line string. Printed in light cyan """ It’s nice caus…

---

## [Adding package failure due to invalid SSL certificate](https://discourse.julialang.org/t/adding-package-failure-due-to-invalid-ssl-certificate/37549)

<div class="topic-metadata">

**Author:** [@leonexu](https://discourse.julialang.org/u/leonexu)\
**Replies:** 16\
**Last updated:** [November 6, 2020, 9:55pm UTC](https://discourse.julialang.org/t/adding-package-failure-due-to-invalid-ssl-certificate/37549 "2020-11-06T21:55:11Z")

</div>

Hello, Installing packages always fails due to ssl certificate related errors. My os: ubuntu 16.04 I have disabled git certification check: git config http.sslVerify false Have tried the follows without luck: julia\>…

---

## [Gradient of gradient](https://discourse.julialang.org/t/gradient-of-gradient/49660)

<div class="topic-metadata">

**Author:** [@jlmaccal](https://discourse.julialang.org/u/jlmaccal)\
**Replies:** 9\
**Last updated:** [November 6, 2020, 9:44pm UTC](https://discourse.julialang.org/t/gradient-of-gradient/49660 "2020-11-06T21:44:06Z")

</div>

I’m implementing a model that requires using the gradients of a feedforward network with respect to its inputs as part of the loss function. I then need to train the network by differentiating the loss with respect to th…

---

## [Component-based modelling in ModelingToolkit.jl with nonsingular mass matrix](https://discourse.julialang.org/t/component-based-modelling-in-modelingtoolkit-jl-with-nonsingular-mass-matrix/49140)

<div class="topic-metadata">

**Author:** [@Dhruva2](https://discourse.julialang.org/u/Dhruva2)\
**Replies:** 13\
**Last updated:** [November 6, 2020, 8:51pm UTC](https://discourse.julialang.org/t/component-based-modelling-in-modelingtoolkit-jl-with-nonsingular-mass-matrix/49140 "2020-11-06T20:51:04Z")

</div>

Hi, I essentially want to solve an easier version of the copy-paste example provided in the docs here. Instead of connecting the two lorenz systems via an algebraic equality, I want to add the state of one system as a ti…

---

## [Cyrillic symbols in comments](https://discourse.julialang.org/t/cyrillic-symbols-in-comments/49693)

<div class="topic-metadata">

**Author:** [@gvbelov](https://discourse.julialang.org/u/gvbelov)\
**Replies:** 13\
**Last updated:** [November 6, 2020, 8:27pm UTC](https://discourse.julialang.org/t/cyrillic-symbols-in-comments/49693 "2020-11-06T20:27:30Z")

</div>

When I use comments, typed in Cyrillic in a file (“hello.jl”) and load this file like that include(“hello.jl”), I have the error message: ERROR: LoadError: syntax: invalid UTF-8 syntax Example: println(“Hello !”) # Бул…

---

## [External Sorting Algorithms in julia?](https://discourse.julialang.org/t/external-sorting-algorithms-in-julia/49703)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 8:11pm UTC](https://discourse.julialang.org/t/external-sorting-algorithms-in-julia/49703 "2020-11-06T20:11:52Z")

</div>

Does somebody have an implementation for external sorting algorithms in julia? If not, who would be interested? I’d like to have this available for HDF5Arrays.jl (WIP), which I’m working on.

---

## [Some question about the structure of Turing models](https://discourse.julialang.org/t/some-question-about-the-structure-of-turing-models/48211)

<div class="topic-metadata">

**Author:** [@mcql](https://discourse.julialang.org/u/mcql)\
**Replies:** 25\
**Last updated:** [November 6, 2020, 6:07pm UTC](https://discourse.julialang.org/t/some-question-about-the-structure-of-turing-models/48211 "2020-11-06T18:07:42Z")

</div>

Hello, given a Turing model @model function λ(y) λ₁ ~ Exponential(alpha) for i in 1:length(y) y\[i\] ~ Poisson(λ₁) end end what is the meaning of the y array? I think it is used to compute the post…

---

## [Trouble with Dot Syntax: .\* Works, .+ and sin. Do Not Work](https://discourse.julialang.org/t/trouble-with-dot-syntax-works-and-sin-do-not-work/49647)

<div class="topic-metadata">

**Author:** [@rode](https://discourse.julialang.org/u/rode)\
**Replies:** 3\
**Last updated:** [November 6, 2020, 6:05pm UTC](https://discourse.julialang.org/t/trouble-with-dot-syntax-works-and-sin-do-not-work/49647 "2020-11-06T18:05:51Z")

</div>

Hello. This is my first post on here. I am doing some work with arrays for a small simulator. I have noticed that multiplication dot functions work fine but addition and trig functions do not. Example where all is well: …

---

## [Findfirst(r"\\d",tmp) works but : findlast(r"\\d",tmp) ERROR: MethodError: no method matching findlast(::Regex, ::String)](https://discourse.julialang.org/t/findfirst-r-d-tmp-works-but-findlast-r-d-tmp-error-methoderror-no-method-matching-findlast-regex-string/49688)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 2\
**Last updated:** [November 6, 2020, 5:26pm UTC](https://discourse.julialang.org/t/findfirst-r-d-tmp-works-but-findlast-r-d-tmp-error-methoderror-no-method-matching-findlast-regex-string/49688 "2020-11-06T17:26:16Z")

</div>

What wrong ? julia\> tmp "\\":\\"83 053 wyś" julia\> findfirst(r"\\d",tmp) 4:4 julia\> findlast(r"\\d",tmp) ERROR: MethodError: no method matching findlast(::Regex, ::String) Closest candidates are: findlast(::Function, ::…

---

## [Calculate gradient of UDE model (without DiffEqFlux.sciml\_train)](https://discourse.julialang.org/t/calculate-gradient-of-ude-model-without-diffeqflux-sciml-train/49488)

<div class="topic-metadata">

**Author:** [@bad\_at\_math](https://discourse.julialang.org/u/bad_at_math)\
**Replies:** 3\
**Last updated:** [November 6, 2020, 5:12pm UTC](https://discourse.julialang.org/t/calculate-gradient-of-ude-model-without-diffeqflux-sciml-train/49488 "2020-11-06T17:12:01Z")

</div>

Hello everyone, I’m interested in using the SciML ecosystem to train universal differential equations models in Julia. However, I don’t want to have to rely on the sciml\_train function – I’m interested in explicitly work…

---

## [Suggestions to handle, smartly, a solution of a stochastic PDE](https://discourse.julialang.org/t/suggestions-to-handle-smartly-a-solution-of-a-stochastic-pde/49650)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 6\
**Last updated:** [November 6, 2020, 4:43pm UTC](https://discourse.julialang.org/t/suggestions-to-handle-smartly-a-solution-of-a-stochastic-pde/49650 "2020-11-06T16:43:59Z")

</div>

Hello, I’m currently building a stochastic PDE solver based on a specific algorithm, under the theme of my master’s thesis. The main idea behind my code is simple, given some inputs (time span, physical domain, number …

---

## [Error/segfault in basic test of CUDA-aware MPI](https://discourse.julialang.org/t/error-segfault-in-basic-test-of-cuda-aware-mpi/31755)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 10\
**Last updated:** [November 6, 2020, 3:35pm UTC](https://discourse.julialang.org/t/error-segfault-in-basic-test-of-cuda-aware-mpi/31755 "2020-11-06T15:35:59Z")

</div>

Problem A basic test of CUDA-aware MPI with MPI.jl fails on both our Cray supercomputer and on another cluster: 1) On Cray system 1.1) Test and error: omlins@dom101:~\> export MPICH\_RDMA\_ENABLED\_CUDA=1 omlins@nid00002:…

---

## [Can't evaluate Pkg.add("RDatasets")](https://discourse.julialang.org/t/cant-evaluate-pkg-add-rdatasets/49156)

<div class="topic-metadata">

**Author:** [@jdietl](https://discourse.julialang.org/u/jdietl)\
**Replies:** 3\
**Last updated:** [November 6, 2020, 3:35pm UTC](https://discourse.julialang.org/t/cant-evaluate-pkg-add-rdatasets/49156 "2020-11-06T15:35:55Z")

</div>

Hi all. I’m trying to work through the Julia for Data Science tutorial, and I’m working on going through Video 3 in JuliaPro 1.5.2-1. I made a script to run the following commands, which worked last week: cd("D:\\\\juli…

---

## [Fastest JSON parser to julia](https://discourse.julialang.org/t/fastest-json-parser-to-julia/49639)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 15\
**Last updated:** [November 6, 2020, 2:12pm UTC](https://discourse.julialang.org/t/fastest-json-parser-to-julia/49639 "2020-11-06T14:12:45Z")

</div>

Hey Julianners, I just realised a speed comparison here: https://www.reddit.com/r/programming/comments/3pojrz/the\_fastest\_json\_parser\_in\_the\_world/ https://github.com/kostya/benchmarks#json where smidjson is one of th…

---

## [Sigterm(15)](https://discourse.julialang.org/t/sigterm-15/49683)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 2:40pm UTC](https://discourse.julialang.org/t/sigterm-15/49683 "2020-11-06T14:40:36Z")

</div>

Hi, killing julia (ubuntu linux) returns errors. This signal also could not be cought by atexit(). Is there an option to gracefully exit julia after SIGTERM is recived? Or at least to exit without errors? Note that af…

---

## [\[ANN\] oneAPI.jl v0.1 - Programming Intel GPUs with oneAPI](https://discourse.julialang.org/t/ann-oneapi-jl-v0-1-programming-intel-gpus-with-oneapi/49680)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 1:35pm UTC](https://discourse.julialang.org/t/ann-oneapi-jl-v0-1-programming-intel-gpus-with-oneapi/49680 "2020-11-06T13:35:48Z")

</div>

Hi all, I’ve released the first version of oneAPI.jl, v0.1, a package for programming GPUs in Julia using the oneAPI toolkit. It has the same capabilities as other GPU programming packages like CUDA.jl and AMDGPU.jl, al…

---

## [Is there a way to plot negative numbers on a log scale?](https://discourse.julialang.org/t/is-there-a-way-to-plot-negative-numbers-on-a-log-scale/49674)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 6\
**Last updated:** [November 6, 2020, 12:01pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-plot-negative-numbers-on-a-log-scale/49674 "2020-11-06T12:01:14Z")

</div>

I know we are not supposed to be able to take the log of a negative number (or 0), but sometimes the scale is really useful. using Plots x = -10:0.01:10 y = x plot(x, y) plot(x, y, yaxis = log10.(y .+ 100)) It’s not …

---

## [\[ANN\] BinaryTraits.jl - a new traits package](https://discourse.julialang.org/t/ann-binarytraits-jl-a-new-traits-package/37475)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 27\
**Last updated:** [November 6, 2020, 11:15am UTC](https://discourse.julialang.org/t/ann-binarytraits-jl-a-new-traits-package/37475 "2020-11-06T11:15:28Z")

</div>

Hi everyone, I would like to announce BinaryTraits.jl, a new traits package that focuses on usability and interface specification. You can find documentation from the project repo as usual. In addition, I have provide…

---

## [Does Julia have a generic way to find nonzero elemements of arrays?](https://discourse.julialang.org/t/does-julia-have-a-generic-way-to-find-nonzero-elemements-of-arrays/49666)

<div class="topic-metadata">

**Author:** [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Replies:** 1\
**Last updated:** [November 6, 2020, 11:00am UTC](https://discourse.julialang.org/t/does-julia-have-a-generic-way-to-find-nonzero-elemements-of-arrays/49666 "2020-11-06T11:00:23Z")

</div>

In https://github.com/JuliaLang/julia/pull/38315#issuecomment-722623188 I suggested iterating over nonzero values as a possible efficient generic constructor for SparseMatrix I then proceed to realize that there isn’t su…

---

## [Why threadIdx().y shows some random value?](https://discourse.julialang.org/t/why-threadidx-y-shows-some-random-value/49659)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 4\
**Last updated:** [November 6, 2020, 10:23am UTC](https://discourse.julialang.org/t/why-threadidx-y-shows-some-random-value/49659 "2020-11-06T10:23:30Z")

</div>

Hi, I am just new to CUDA and trying to learn. I tried to print thread id’s in x and y direction using the following code: using CUDA function test\_kernel() @cuprintln("idx: %d, idy: %d",threadIdx().x, threadIdx().y) …

---

## [Adding elements to dictionaries?](https://discourse.julialang.org/t/adding-elements-to-dictionaries/49670)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [November 6, 2020, 8:43am UTC](https://discourse.julialang.org/t/adding-elements-to-dictionaries/49670 "2020-11-06T08:43:22Z")

</div>

Suppose I have a dictionary d = Dict("a"=-\>(1,2,3)) and I want to add an element with key "b" to the dictionary. The following works: merge!(d,Dict("b"=\>(4,5,6))) However, this only seems to work if the value of the ke…

---

## [Transferring data structures between Julia files?](https://discourse.julialang.org/t/transferring-data-structures-between-julia-files/49636)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 8\
**Last updated:** [November 6, 2020, 8:08am UTC](https://discourse.julialang.org/t/transferring-data-structures-between-julia-files/49636 "2020-11-06T08:08:52Z")

</div>

I need to transfer information between two Julia files (or: between two Jupyter notebooks). Examples of data structures: A dictionary with keys “a”, “b”, “c”, etc., where the value for each key is a tuple holding Float…

---

## [User Defined Functions Using Input](https://discourse.julialang.org/t/user-defined-functions-using-input/49664)

<div class="topic-metadata">

**Author:** [@rhelmstedter](https://discourse.julialang.org/u/rhelmstedter)\
**Replies:** 5\
**Last updated:** [November 6, 2020, 5:44am UTC](https://discourse.julialang.org/t/user-defined-functions-using-input/49664 "2020-11-06T05:44:45Z")

</div>

This is my first program in Julia. I am most familiar with python, but as a math teacher I fell in love with being able to define a function like you would on paper (e.g. f(n) = 4n+4). I am trying to write a simple prog…

---

## [Proper Julia syntax for Kriging interpolation with Geostats.jl?](https://discourse.julialang.org/t/proper-julia-syntax-for-kriging-interpolation-with-geostats-jl/49506)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 8\
**Last updated:** [November 6, 2020, 2:13am UTC](https://discourse.julialang.org/t/proper-julia-syntax-for-kriging-interpolation-with-geostats-jl/49506 "2020-11-06T02:13:42Z")

</div>

Hi, I’m trying to use Kriging to interpolate between data values in a discrete array. The following code (and variations of it) give errors like, MethodError: no method matching EstimationProblem(::Set{Float64}, ::Regul…

---

## [Parallelising a broadcast on a large-allocating function](https://discourse.julialang.org/t/parallelising-a-broadcast-on-a-large-allocating-function/49654)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 12:47am UTC](https://discourse.julialang.org/t/parallelising-a-broadcast-on-a-large-allocating-function/49654 "2020-11-06T00:47:01Z")

</div>

I would like to parallelise a broadcast of a complicated function on my machine. Being new to parallel computing, I’m getting swamped and lost in all the posts and comments and open issues on it. My context is a little …

---

## [MLJFlux much faster for simple MNIST example than TensorFlow?](https://discourse.julialang.org/t/mljflux-much-faster-for-simple-mnist-example-than-tensorflow/49646)

<div class="topic-metadata">

**Author:** [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Replies:** 0\
**Last updated:** [November 5, 2020, 9:57pm UTC](https://discourse.julialang.org/t/mljflux-much-faster-for-simple-mnist-example-than-tensorflow/49646 "2020-11-05T21:57:26Z")

</div>

I am trying to port this TensorFlow MNIST example to MLJFlux.jl. This is what I have so far, it is currently achieving an accuracy of 97.1%, which is pretty similar to the TensorFlow example: using MLJ, MLJFlux, Flux m…

---

## [Bit Manipulation Instruction Set](https://discourse.julialang.org/t/bit-manipulation-instruction-set/5368)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 9\
**Last updated:** [January 12, 2019, 12:05pm UTC](https://discourse.julialang.org/t/bit-manipulation-instruction-set/5368 "2019-01-12T12:05:21Z")

</div>

I saw on stackoverflow, there are “Parallel bit deposit and extract” instructions, which are part of BMI2 (Bit Manipulation Instruction Set 2). Are these instructions (PDEP and PEXT) available to Julia / LLVM? algorith…

---

## [Multivariatestats: No method matching fit for PCA & DataFrame](https://discourse.julialang.org/t/multivariatestats-no-method-matching-fit-for-pca-dataframe/49291)

<div class="topic-metadata">

**Author:** [@vphpin](https://discourse.julialang.org/u/vphpin)\
**Replies:** 8\
**Last updated:** [November 5, 2020, 8:32pm UTC](https://discourse.julialang.org/t/multivariatestats-no-method-matching-fit-for-pca-dataframe/49291 "2020-11-05T20:32:59Z")

</div>

Hi! I am currently trying to learn both ML and Julia and I am looking at this dataset, and wish to perform PCA on it. UCI Machine Learning Repository: Zoo Data Set Reading the example in Principal Component Analysis — M…

[Previous page](https://discourse.julialang.org/latest.md?page=1579)

[Next page](https://discourse.julialang.org/latest.md?page=1581)
