# Latest

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

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

**Page:** 1420

---

## [GMM as collaborative filering: why it is better than k-nearest neighbours (KNN)?](https://discourse.julialang.org/t/gmm-as-collaborative-filering-why-it-is-better-than-k-nearest-neighbours-knn/59647)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [April 20, 2021, 8:29am UTC](https://discourse.julialang.org/t/gmm-as-collaborative-filering-why-it-is-better-than-k-nearest-neighbours-knn/59647 "2021-04-20T08:29:23Z")

</div>

I have this quotes from a MITx Machine Learning course (but these are from my notes, so I am no longer 100% sure they are exactly the lectures words): "There has been many improvements that has been added to this kind o…

---

## [EXCEPTION\_ACCESS\_VIOLATION with LowRankApprox](https://discourse.julialang.org/t/exception-access-violation-with-lowrankapprox/59599)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 0\
**Last updated:** [April 19, 2021, 4:36pm UTC](https://discourse.julialang.org/t/exception-access-violation-with-lowrankapprox/59599 "2021-04-19T16:36:16Z")

</div>

While working on some functions based on LowRankApprox.jl I got an EXCEPTION\_ACCESS\_VIOLATION error in a MKL dll. Sadly, I was not able to make a MWE from my original code that shows the issue. My script uses a pqr …

---

## [Groupby() on two individual arrays](https://discourse.julialang.org/t/groupby-on-two-individual-arrays/59643)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 1\
**Last updated:** [April 20, 2021, 7:55am UTC](https://discourse.julialang.org/t/groupby-on-two-individual-arrays/59643 "2021-04-20T07:55:18Z")

</div>

I have two arrays with same dimension: a1 = \[1,1,3,4,6,6\] a2 = \[1,2,3,4,5,6\] But I want to group both of them with respect to array a1 and get the mean of the array a2 for each group. My output is coming from array a2,…

---

## [Creating a custom Julia AWS Layer Runtime](https://discourse.julialang.org/t/creating-a-custom-julia-aws-layer-runtime/18166)

<div class="topic-metadata">

**Author:** [@Seanny123](https://discourse.julialang.org/u/Seanny123)\
**Replies:** 29\
**Last updated:** [April 20, 2021, 7:36am UTC](https://discourse.julialang.org/t/creating-a-custom-julia-aws-layer-runtime/18166 "2021-04-20T07:36:44Z")

</div>

To deploy a Julia program on AWS Lambda currently involves making a custom Docker Image. Recently, Amazon announced the ability to create a Custom Runtime, which lowers the barrier to entry. However, their tutorial is qu…

---

## [How do I create a new DataFrame from another Dataframe by removing certain columns](https://discourse.julialang.org/t/how-do-i-create-a-new-dataframe-from-another-dataframe-by-removing-certain-columns/59642)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [April 20, 2021, 7:10am UTC](https://discourse.julialang.org/t/how-do-i-create-a-new-dataframe-from-another-dataframe-by-removing-certain-columns/59642 "2021-04-20T07:10:34Z")

</div>

I wish to create a new DataFrame from another Dataframe by removing certain columns. I was hoping the following simple syntax would work, but I get the error “MethodError: no method matching InvertedIndex(::Symbol, ::Sy…

---

## [Saving output to txt/CSV file?](https://discourse.julialang.org/t/saving-output-to-txt-csv-file/59636)

<div class="topic-metadata">

**Author:** [@Bonjour-Lemonde](https://discourse.julialang.org/u/Bonjour-Lemonde)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 5:47am UTC](https://discourse.julialang.org/t/saving-output-to-txt-csv-file/59636 "2021-04-20T05:47:25Z")

</div>

Hi guys, I am dealing with output saving, I have tried several ways referred to docs. But nothing works for me. The output I want to save look like this julia\> sim\_result GpABC.SimulatedABCRejectionOutput(3, 1465, 2000…

---

## [Make names available within block](https://discourse.julialang.org/t/make-names-available-within-block/59633)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [April 20, 2021, 3:43am UTC](https://discourse.julialang.org/t/make-names-available-within-block/59633 "2021-04-20T03:43:34Z")

</div>

Is it possible to make names accessible within a block, like this? obj = (;x=1, y=2) with obj do x + y end # x and y are not accessible here

---

## [Intrusive Collections in Julia](https://discourse.julialang.org/t/intrusive-collections-in-julia/59381)

<div class="topic-metadata">

**Author:** [@bjkaria](https://discourse.julialang.org/u/bjkaria)\
**Replies:** 9\
**Last updated:** [April 20, 2021, 3:33am UTC](https://discourse.julialang.org/t/intrusive-collections-in-julia/59381 "2021-04-20T03:33:33Z")

</div>

Would intrusive collections modeled after the boost intrusive boost intrusive 1.75.0 collection be a useful addition for Julia. Does Julia already have mechanisms which make such collections superfluous. Consider the ad…

---

## [\[blog\] direnv and Julia](https://discourse.julialang.org/t/blog-direnv-and-julia/59609)

<div class="topic-metadata">

**Author:** [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Replies:** 1\
**Last updated:** [April 20, 2021, 3:03am UTC](https://discourse.julialang.org/t/blog-direnv-and-julia/59609 "2021-04-20T03:03:44Z")

</div>

Hello! I just published a post about using direnv together with Julia. I have found direnv to be a very nice quality-of-life improvement to my workflow. Feel free to read the post and discuss here!

---

## [What's the best practice in Julia for research (often changed codes)?](https://discourse.julialang.org/t/whats-the-best-practice-in-julia-for-research-often-changed-codes/58892)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 26\
**Last updated:** [April 20, 2021, 1:04am UTC](https://discourse.julialang.org/t/whats-the-best-practice-in-julia-for-research-often-changed-codes/58892 "2021-04-20T01:04:58Z")

</div>

Hi, I’ve used Julia about one year and I still struggle with how to use it. First of all, as a researcher, I often change my code including code structure and Julia types. When redefining types, Julia REPL needs to be …

---

## [Plots GR axis break](https://discourse.julialang.org/t/plots-gr-axis-break/59322)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 5\
**Last updated:** [April 20, 2021, 12:48am UTC](https://discourse.julialang.org/t/plots-gr-axis-break/59322 "2021-04-20T00:48:53Z")

</div>

Is it possible to plot a figure containing axis break like this using Plots.jl and GR backend? Especially in boxplot.

---

## [How to detect container resize event in GTK Julia?](https://discourse.julialang.org/t/how-to-detect-container-resize-event-in-gtk-julia/59622)

<div class="topic-metadata">

**Author:** [@johntrinder](https://discourse.julialang.org/u/johntrinder)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 11:59pm UTC](https://discourse.julialang.org/t/how-to-detect-container-resize-event-in-gtk-julia/59622 "2021-04-19T23:59:27Z")

</div>

I’ve searched and scoured google for an answer but to no avail :frowning:

---

## [Getindex A\[i,j\] wrong complexity on SparseMatrixCSC?](https://discourse.julialang.org/t/getindex-a-i-j-wrong-complexity-on-sparsematrixcsc/59277)

<div class="topic-metadata">

**Author:** [@bonevbs](https://discourse.julialang.org/u/bonevbs)\
**Replies:** 18\
**Last updated:** [April 19, 2021, 11:30pm UTC](https://discourse.julialang.org/t/getindex-a-i-j-wrong-complexity-on-sparsematrixcsc/59277 "2021-04-19T23:30:12Z")

</div>

The complexity of extracting a sparse submatrix A\[i,j\] of size k x l from a large sparse matrix of size n with nnz entries should be O(k log k + l nz log k). Accessing my sparse matrices seemed very slow and I checked …

---

## [ERROR: Unable to locate KNITRO installation, please check your environment variable KNITRODIR](https://discourse.julialang.org/t/error-unable-to-locate-knitro-installation-please-check-your-environment-variable-knitrodir/59619)

<div class="topic-metadata">

**Author:** [@yecyn](https://discourse.julialang.org/u/yecyn)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 11:12pm UTC](https://discourse.julialang.org/t/error-unable-to-locate-knitro-installation-please-check-your-environment-variable-knitrodir/59619 "2021-04-19T23:12:04Z")

</div>

Hello, I’ve downloaded KNITRO from Artelys, and I have unpacked the zip file and have a folder named “knitro-12.3.0-MacOS-64” under my home file. However, while I was running the using KNITRO in jupyter notebook, I got…

---

## [Diminishing returns to \`nthreads\`](https://discourse.julialang.org/t/diminishing-returns-to-nthreads/59621)

<div class="topic-metadata">

**Author:** [@kailukowiak](https://discourse.julialang.org/u/kailukowiak)\
**Replies:** 3\
**Last updated:** [April 19, 2021, 10:29pm UTC](https://discourse.julialang.org/t/diminishing-returns-to-nthreads/59621 "2021-04-19T22:29:12Z")

</div>

Performance with n Threads I have a script that parses a 1Gb file and writes out two CSV files. I want to make this faster by parallelizing it on a large cloud instance. I’m currently testing on an AWS machine c5.9xlarge …

---

## [ERROR: Unable to automatically install 'libsodium' from '/Users/lshi/.julia/packages/libsodium\_jll/gfVNr/Artifacts.toml'](https://discourse.julialang.org/t/error-unable-to-automatically-install-libsodium-from-users-lshi-julia-packages-libsodium-jll-gfvnr-artifacts-toml/59548)

<div class="topic-metadata">

**Author:** [@yecyn](https://discourse.julialang.org/u/yecyn)\
**Replies:** 7\
**Last updated:** [April 19, 2021, 10:05pm UTC](https://discourse.julialang.org/t/error-unable-to-automatically-install-libsodium-from-users-lshi-julia-packages-libsodium-jll-gfvnr-artifacts-toml/59548 "2021-04-19T22:05:57Z")

</div>

Hello all, I just installed Julia, and was trying to install packages. However I run into the following error: import Pkg; Pkg.add("StatsBase") Resolving package versions... Unable to automatically install 'libsodium'…

---

## [Lambda or Cloud Functions -- eventually possible?](https://discourse.julialang.org/t/lambda-or-cloud-functions-eventually-possible/39128)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 8\
**Last updated:** [April 19, 2021, 10:03pm UTC](https://discourse.julialang.org/t/lambda-or-cloud-functions-eventually-possible/39128 "2021-04-19T22:03:12Z")

</div>

Things like AWS Lambda and/or Google Cloud Functions are basically just replacements for traditionally lightweight tasks that smart people realized could be done without a server. Right now, you can create these serverle…

---

## [SimpleContainerGenerator: Create container images for using Julia packages (especially useful on systems without Internet access)](https://discourse.julialang.org/t/simplecontainergenerator-create-container-images-for-using-julia-packages-especially-useful-on-systems-without-internet-access/37736)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 3\
**Last updated:** [April 19, 2021, 9:25pm UTC](https://discourse.julialang.org/t/simplecontainergenerator-create-container-images-for-using-julia-packages-especially-useful-on-systems-without-internet-access/37736 "2021-04-19T21:25:37Z")

</div>

SimpleContainerGenerator automates the process of creating container images (Docker, Singularity, etc.) for using Julia packages. This is especially useful if you need to run Julia packages on systems without any Intern…

---

## [How to handle Array of Arrays?](https://discourse.julialang.org/t/how-to-handle-array-of-arrays/59602)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 4\
**Last updated:** [April 19, 2021, 9:11pm UTC](https://discourse.julialang.org/t/how-to-handle-array-of-arrays/59602 "2021-04-19T21:11:55Z")

</div>

How to construct ff and gg from hh in the code below? Thx! f(x) = \[1;1\] g(x) = x\*\[1;1\] h(x) = \[1;1\], x\*\[1;1\] ff = mapreduce(f,vcat, \[1 2 3\]) gg = mapreduce(g,vcat, \[1 2 3\]) hh = map(h, \[1 2 3\])

---

## [UnitfulLsqFit](https://discourse.julialang.org/t/unitfullsqfit/57815)

<div class="topic-metadata">

**Author:** [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Replies:** 5\
**Last updated:** [April 19, 2021, 7:45pm UTC](https://discourse.julialang.org/t/unitfullsqfit/57815 "2021-04-19T19:45:01Z")

</div>

This is not registered, in part because I think there are features in LsqFit.jl that I haven’t implemented an interface to yet, and in part because I wanted to know if anyone else wants this before I polish it further th…

---

## [How to catch stdout per module?](https://discourse.julialang.org/t/how-to-catch-stdout-per-module/59611)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 0\
**Last updated:** [April 19, 2021, 7:45pm UTC](https://discourse.julialang.org/t/how-to-catch-stdout-per-module/59611 "2021-04-19T19:45:27Z")

</div>

If I want to run unrelated tasks and output stdout over the network how would I capture stdout in a module without another module stealing it? As I see it there is only one Base.stdout, which is the default for println.…

---

## [Bounding Correlation Coefficients with JuMP](https://discourse.julialang.org/t/bounding-correlation-coefficients-with-jump/59589)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 2\
**Last updated:** [April 19, 2021, 7:52pm UTC](https://discourse.julialang.org/t/bounding-correlation-coefficients-with-jump/59589 "2021-04-19T19:52:54Z")

</div>

New to julia and this discussion group so I’m sorry if this is not a typical discussion topic or if I am breaching any norms here. I will do my best to pick up on things as I go. In “Convex Optimization” by Boyd there i…

---

## [Poor performance passing data structures as function argument](https://discourse.julialang.org/t/poor-performance-passing-data-structures-as-function-argument/59601)

<div class="topic-metadata">

**Author:** [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Replies:** 5\
**Last updated:** [April 19, 2021, 7:43pm UTC](https://discourse.julialang.org/t/poor-performance-passing-data-structures-as-function-argument/59601 "2021-04-19T19:43:21Z")

</div>

I have a compute-heavy function kernel that I am trying to use inside another function. This function takes several arrays and other data as arguments, and I was trying to make the code cleaner by passing an object as ar…

---

## [What is the cause of this performance difference between Julia and Cython?](https://discourse.julialang.org/t/what-is-the-cause-of-this-performance-difference-between-julia-and-cython/58886)

<div class="topic-metadata">

**Author:** [@smpurkis](https://discourse.julialang.org/u/smpurkis)\
**Replies:** 9\
**Last updated:** [April 19, 2021, 6:47pm UTC](https://discourse.julialang.org/t/what-is-the-cause-of-this-performance-difference-between-julia-and-cython/58886 "2021-04-19T18:47:36Z")

</div>

Hello all, I’m fairly new to Julia. I have a simple array function I’m using for comparing the speed of different languages. In this case Julia and Cython (subset of Python). The function in Julia is: function comput…

---

## [Maintain min-Heap together with another vector](https://discourse.julialang.org/t/maintain-min-heap-together-with-another-vector/59604)

<div class="topic-metadata">

**Author:** [@Rouzaire](https://discourse.julialang.org/u/Rouzaire)\
**Replies:** 0\
**Last updated:** [April 19, 2021, 6:46pm UTC](https://discourse.julialang.org/t/maintain-min-heap-together-with-another-vector/59604 "2021-04-19T18:46:37Z")

</div>

Hello everyone, I have a 2D matrix of 2 rows and n columns. The first row represents a distance (type : Float \> 0). The second row represents an ID (type : Integer \> 0) corresponding to the distance above. First ques…

---

## [PSA: If your package's version is of the form \`0.y.z\`, please do NOT bump the minor version for new features](https://discourse.julialang.org/t/psa-if-your-packages-version-is-of-the-form-0-y-z-please-do-not-bump-the-minor-version-for-new-features/46570)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 3:08am UTC](https://discourse.julialang.org/t/psa-if-your-packages-version-is-of-the-form-0-y-z-please-do-not-bump-the-minor-version-for-new-features/46570 "2020-09-14T03:08:55Z")

</div>

The Julia package manager implements semantic versioning differently for packages that are pre-1.0 versus packages that are post-1.0. For packages that are pre-1.0 (i.e. the package’s version is of the form 0.y.z), we i…

---

## [Different outcomes with the same function](https://discourse.julialang.org/t/different-outcomes-with-the-same-function/59570)

<div class="topic-metadata">

**Author:** [@valperez](https://discourse.julialang.org/u/valperez)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 6:24pm UTC](https://discourse.julialang.org/t/different-outcomes-with-the-same-function/59570 "2021-04-19T18:24:40Z")

</div>

Hi, I’m making a program in Julia that calculates the posteriori distribution of a beta binomial model. My first model was the following: @model betabinomial(n, z, x, y, delta, gamma) = begin alpha\_p ~ truncated(Norma…

---

## [Questions about SymEngine.jl](https://discourse.julialang.org/t/questions-about-symengine-jl/59598)

<div class="topic-metadata">

**Author:** [@cnf](https://discourse.julialang.org/u/cnf)\
**Replies:** 0\
**Last updated:** [April 19, 2021, 3:05pm UTC](https://discourse.julialang.org/t/questions-about-symengine-jl/59598 "2021-04-19T15:05:43Z")

</div>

I have the following questions about the package SymEngine.jl (running with julia 1.5.2 on a linux machine). (1) List of SymEngine.jl functions for linear algebra computations with symbolic matrices. For example, reduc…

---

## [CUDA.randn! allocation](https://discourse.julialang.org/t/cuda-randn-allocation/59506)

<div class="topic-metadata">

**Author:** [@zhiwei](https://discourse.julialang.org/u/zhiwei)\
**Replies:** 2\
**Last updated:** [April 19, 2021, 5:25pm UTC](https://discourse.julialang.org/t/cuda-randn-allocation/59506 "2021-04-19T17:25:22Z")

</div>

Hello, I’m using CUDA.randn! on a CuArray and CUDA.@allocated reports memory allocations. This doesn’t happen for CUDA.rand!. I wonder if this is normal? julia\> rng = CURAND.default\_rng() julia\> a = CuArray{Float64}(u…

---

## [Embed a Dash app in Genie.jl website](https://discourse.julialang.org/t/embed-a-dash-app-in-genie-jl-website/56616)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 5:05pm UTC](https://discourse.julialang.org/t/embed-a-dash-app-in-genie-jl-website/56616 "2021-04-19T17:05:58Z")

</div>

Hi! I’m trying to embed a Dash.jl app in a website that is generated by Genie.jl. My approach is working with Stipple.jl apps but unfortunately, due to the lack of documentation I’m not able to do something useful with…

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

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