# Latest

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

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

**Page:** 1701

---

## [Change an array by removing all rows that have a particular value in a particular column](https://discourse.julialang.org/t/change-an-array-by-removing-all-rows-that-have-a-particular-value-in-a-particular-column/42421)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 10:05am UTC](https://discourse.julialang.org/t/change-an-array-by-removing-all-rows-that-have-a-particular-value-in-a-particular-column/42421 "2020-07-02T10:05:02Z")

</div>

Suppose I have an row x col array, called A, for example. In column 10, say, there are many different values. Some of these are 0. How do I change A so that all rows that contain 0 in column 10 are deleted?

---

## [Allocations when creating graphs, inefficiencies](https://discourse.julialang.org/t/allocations-when-creating-graphs-inefficiencies/42394)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 12\
**Last updated:** [July 2, 2020, 9:57am UTC](https://discourse.julialang.org/t/allocations-when-creating-graphs-inefficiencies/42394 "2020-07-02T09:57:55Z")

</div>

I am creating my own method to create a graph in 3D because graphplot has a bug, which I reported here and on Github, and I got no reply, and yet I still need the plot. Here is some MWE, which I run 2-3 times to make sur…

---

## [Defining plots in function results in world problem](https://discourse.julialang.org/t/defining-plots-in-function-results-in-world-problem/42401)

<div class="topic-metadata">

**Author:** [@morkip](https://discourse.julialang.org/u/morkip)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 9:38am UTC](https://discourse.julialang.org/t/defining-plots-in-function-results-in-world-problem/42401 "2020-07-02T09:38:10Z")

</div>

I just stumbled across the following behaviour: This code works using Plots x = range(0, 2 \* pi, length=200) Plots.pyplot() p1 = plot(x, cos.(x)) display(p1) savefig(p1, "test.pdf") println("success") while this code …

---

## [How to properly measure time of a loop - having issues with global scope I think](https://discourse.julialang.org/t/how-to-properly-measure-time-of-a-loop-having-issues-with-global-scope-i-think/42396)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 9:28am UTC](https://discourse.julialang.org/t/how-to-properly-measure-time-of-a-loop-having-issues-with-global-scope-i-think/42396 "2020-07-02T09:28:41Z")

</div>

Hi, I’m working in IJulia with @time begin to measure how long my code takes. I have some code that iterates row by row over one input dataframe, merges it with other dataframes that had been assigned to variables earl…

---

## [Segfault with cfunction, possibly world age related](https://discourse.julialang.org/t/segfault-with-cfunction-possibly-world-age-related/42417)

<div class="topic-metadata">

**Author:** [@Christian\_Rorvik](https://discourse.julialang.org/u/Christian_Rorvik)\
**Replies:** 4\
**Last updated:** [July 2, 2020, 9:10am UTC](https://discourse.julialang.org/t/segfault-with-cfunction-possibly-world-age-related/42417 "2020-07-02T09:10:06Z")

</div>

Full issue description here, along with workarounds and alternative code. Following segfaults for me, tested on Windows, Linux, Julia 1.4.1 and 1.4.2: module Foo null\_handler(x) = nothing mutable struct A1{T} value…

---

## [Undefined Variable](https://discourse.julialang.org/t/undefined-variable/42416)

<div class="topic-metadata">

**Author:** [@hyacykcharel](https://discourse.julialang.org/u/hyacykcharel)\
**Replies:** 1\
**Last updated:** [July 2, 2020, 8:25am UTC](https://discourse.julialang.org/t/undefined-variable/42416 "2020-07-02T08:25:06Z")

</div>

function Plot\_Poisson\_Equation(n) A = zeros(n-1,n-1) for i in 1:n-2 A\[i,i+1\] = -1 A\[i,i\] = 2 A\[i+1,i\] = -1 end end Hello Im still gettin Erro A, and u not define…

---

## [Suddenly cannot use Plots package](https://discourse.julialang.org/t/suddenly-cannot-use-plots-package/42385)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 5\
**Last updated:** [July 2, 2020, 8:17am UTC](https://discourse.julialang.org/t/suddenly-cannot-use-plots-package/42385 "2020-07-02T08:17:48Z")

</div>

I am using julia 1.3.0, and suddenly I cannot use the Plots.jl package. This the error I get: julia\> using Plots \[ Info: Precompiling Plots \[91a5bcdd-55d7-5caf-9e0b-520d859cae80\] GC error (probable corruption) : Alloca…

---

## [Enumerate with keys from a dict](https://discourse.julialang.org/t/enumerate-with-keys-from-a-dict/42413)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 3\
**Last updated:** [July 2, 2020, 8:04am UTC](https://discourse.julialang.org/t/enumerate-with-keys-from-a-dict/42413 "2020-07-02T08:04:36Z")

</div>

I am wondering if the behaviour in the picture below is intended? Shouldn’t i stop at 9999?

---

## [A question about module](https://discourse.julialang.org/t/a-question-about-module/42415)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 1\
**Last updated:** [July 2, 2020, 7:56am UTC](https://discourse.julialang.org/t/a-question-about-module/42415 "2020-07-02T07:56:24Z")

</div>

want to use another script’s module in one script,it always tell me “a” is not defind, module asd export a a=2 end include("Julia测试.jl") print(a) thanks!!

---

## [Memory allocation when creating struct with dynamic array](https://discourse.julialang.org/t/memory-allocation-when-creating-struct-with-dynamic-array/42346)

<div class="topic-metadata">

**Author:** [@awin](https://discourse.julialang.org/u/awin)\
**Replies:** 6\
**Last updated:** [July 2, 2020, 6:54am UTC](https://discourse.julialang.org/t/memory-allocation-when-creating-struct-with-dynamic-array/42346 "2020-07-02T06:54:38Z")

</div>

I am writing a package for simulating realistic quantum systems. A key component in these simulations is defining pulses. Defining several constant size structs NormPulse, SquarePulse, etc. behaves as expected. However, …

---

## [ODE Sundials not recognizing \`maxiters\` argument](https://discourse.julialang.org/t/ode-sundials-not-recognizing-maxiters-argument/42377)

<div class="topic-metadata">

**Author:** [@Yuki-Kanai](https://discourse.julialang.org/u/Yuki-Kanai)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 6:18am UTC](https://discourse.julialang.org/t/ode-sundials-not-recognizing-maxiters-argument/42377 "2020-07-02T06:18:18Z")

</div>

I am using OrdinaryDiffEq with Sundials. While other options such as stability\_limit\_detect max\_hnil\_warns max\_error\_test\_failures seem to be working, the option maxiters doesn’t seem to stop iteration at all; The it…

---

## [Ideas for useful packages missing from the ecosystem](https://discourse.julialang.org/t/ideas-for-useful-packages-missing-from-the-ecosystem/42063)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 15\
**Last updated:** [July 2, 2020, 5:57am UTC](https://discourse.julialang.org/t/ideas-for-useful-packages-missing-from-the-ecosystem/42063 "2020-07-02T05:57:17Z")

</div>

I wanted to share two packages which provide useful functionality but are currently not available in Julia. The following two would make Julia even more attractable for users in / with #hpc. SSH Tunneling (https://gi…

---

## [\`2^64\` gives \`0\` and some suggestions](https://discourse.julialang.org/t/2-64-gives-0-and-some-suggestions/42408)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 5:43am UTC](https://discourse.julialang.org/t/2-64-gives-0-and-some-suggestions/42408 "2020-07-02T05:43:14Z")

</div>

I am scripting a common beginner pitfalls video for Julia. One of them is 2^64 gives 0. I think SafeREPL.jl can help with that. Would that good advice? I mean the other thing is that they should be aware of what they ar…

---

## [Why it does not modify vector in place](https://discourse.julialang.org/t/why-it-does-not-modify-vector-in-place/42398)

<div class="topic-metadata">

**Author:** [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Replies:** 5\
**Last updated:** [July 2, 2020, 2:27am UTC](https://discourse.julialang.org/t/why-it-does-not-modify-vector-in-place/42398 "2020-07-02T02:27:55Z")

</div>

Hi, I was confused with the following function that modify the vector “as a whole” v.s. the link Performance Tips · The Julia Language. My function does not change the vector. Why will it behave differently? Thank you …

---

## [Gadfly DataFrame "cannot convert"](https://discourse.julialang.org/t/gadfly-dataframe-cannot-convert/42383)

<div class="topic-metadata">

**Author:** [@colinclout12](https://discourse.julialang.org/u/colinclout12)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 12:13am UTC](https://discourse.julialang.org/t/gadfly-dataframe-cannot-convert/42383 "2020-07-02T00:13:58Z")

</div>

I’m sure I’m making a relatively elementary error, but when I attempt to work through the Gadfly tutorial, I keep getting errors when I run their code. For instance, when I run: using RDatasets using Gadfly iris = datas…

---

## [Idiomatic way to find extreme and the next (less) extreme unique values](https://discourse.julialang.org/t/idiomatic-way-to-find-extreme-and-the-next-less-extreme-unique-values/42331)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 13\
**Last updated:** [July 2, 2020, 12:03am UTC](https://discourse.julialang.org/t/idiomatic-way-to-find-extreme-and-the-next-less-extreme-unique-values/42331 "2020-07-02T00:03:11Z")

</div>

I have: julia\> a = \[3, 1, 4, 1, Inf, Inf\] julia\> extrema(a) (1.0, Inf) I would like to find the next pair of extreme values of array a , which are different from the original ones, i.e. laying inside (1.0, Inf) interva…

---

## [Problems with dispatching of Base.iterate](https://discourse.julialang.org/t/problems-with-dispatching-of-base-iterate/42367)

<div class="topic-metadata">

**Author:** [@Isaia\_Nisoli](https://discourse.julialang.org/u/Isaia_Nisoli)\
**Replies:** 3\
**Last updated:** [July 1, 2020, 9:05pm UTC](https://discourse.julialang.org/t/problems-with-dispatching-of-base-iterate/42367 "2020-07-01T21:05:42Z")

</div>

The situation is the following: I’m defining some iterators with the following structure module foo module Generic import Base: iterate abstract type Gen struct iterator{G} where {G\<:Gen} end Base.iterate(S::iterato…

---

## [Julia optimizations causing crash on ubuntu while sorting multidim arrays](https://discourse.julialang.org/t/julia-optimizations-causing-crash-on-ubuntu-while-sorting-multidim-arrays/42388)

<div class="topic-metadata">

**Author:** [@kkylin](https://discourse.julialang.org/u/kkylin)\
**Replies:** 3\
**Last updated:** [July 1, 2020, 6:57pm UTC](https://discourse.julialang.org/t/julia-optimizations-causing-crash-on-ubuntu-while-sorting-multidim-arrays/42388 "2020-07-01T18:57:26Z")

</div>

Hi all, I’ve been using Julia on Macs for years and just got a Linux box. After installing Julia (via apt) recently, I am getting crashes sorting multidim arrays with -O2 and -O3, but not with -O0 and -O1. (Details be…

---

## [Edges plotted with graphplot, which should not be](https://discourse.julialang.org/t/edges-plotted-with-graphplot-which-should-not-be/42386)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 1, 2020, 5:02pm UTC](https://discourse.julialang.org/t/edges-plotted-with-graphplot-which-should-not-be/42386 "2020-07-01T17:02:41Z")

</div>

I am successfully interacting with a 3D graph created with LightGraphs, but plotly backend is rather slow when I have 2000 nodes and 10,000 edges. It might be slow because the curvature argument creates intermediate poin…

---

## [Add column names to a GLM.LinearModel estimated in matrix form](https://discourse.julialang.org/t/add-column-names-to-a-glm-linearmodel-estimated-in-matrix-form/40676)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [July 1, 2020, 6:20pm UTC](https://discourse.julialang.org/t/add-column-names-to-a-glm-linearmodel-estimated-in-matrix-form/40676 "2020-07-01T18:20:33Z")

</div>

I am estimating a bunch of linear models using GLM.lm(X, y), where X is a matrix. I have column names for X from a database, and I would like to have the result from fit/lm to include them. MWE: using GLM X = hcat(ones(…

---

## [Plotly and graphplot](https://discourse.julialang.org/t/plotly-and-graphplot/42379)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 1, 2020, 3:48pm UTC](https://discourse.julialang.org/t/plotly-and-graphplot/42379 "2020-07-01T15:48:21Z")

</div>

I would like to plot and rotate with the mouse a 3D SimpleGraph from LightGraphs.jl. Here is MWE: using LightGraphs using GraphRecipes import Plots Plots.PlotlyBackend() function plotGraph() graph = SimpleGraph(20,…

---

## [How do you evaluate a parameter/variable if you are not in Main eval or Core.Eval do not work?](https://discourse.julialang.org/t/how-do-you-evaluate-a-parameter-variable-if-you-are-not-in-main-eval-or-core-eval-do-not-work/42343)

<div class="topic-metadata">

**Author:** [@cbasile21](https://discourse.julialang.org/u/cbasile21)\
**Replies:** 4\
**Last updated:** [July 1, 2020, 3:44pm UTC](https://discourse.julialang.org/t/how-do-you-evaluate-a-parameter-variable-if-you-are-not-in-main-eval-or-core-eval-do-not-work/42343 "2020-07-01T15:44:19Z")

</div>

Hello, I would really appreciate your help with the following problem. I will want to learn how evaluate a variable outside of Main, and I could not find a way to do that yet. Expected: Eval will work for #println(Core…

---

## [How to extract the Type of a generic struct and use it for pattern matching?](https://discourse.julialang.org/t/how-to-extract-the-type-of-a-generic-struct-and-use-it-for-pattern-matching/42371)

<div class="topic-metadata">

**Author:** [@Junars](https://discourse.julialang.org/u/Junars)\
**Replies:** 10\
**Last updated:** [July 1, 2020, 3:06pm UTC](https://discourse.julialang.org/t/how-to-extract-the-type-of-a-generic-struct-and-use-it-for-pattern-matching/42371 "2020-07-01T15:06:41Z")

</div>

I’m a novice, someone could help? here’s the demo code I want: struct Foo{T \<: Real} cont::String end bar = Foo{Int}("test") typeof(bar) == Foo{Int} # true # is there a package can do pattern match like this? @…

---

## [Parallel workflow](https://discourse.julialang.org/t/parallel-workflow/42259)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 2\
**Last updated:** [July 1, 2020, 3:05pm UTC](https://discourse.julialang.org/t/parallel-workflow/42259 "2020-07-01T15:05:38Z")

</div>

I’m running a bunch of DiffEq solvers in parallel, summarizing the results, and then saving them. Can anyone recommend the best workflow to do this given the current state of Julia’s parallel code, either v1.4 or v1.5? …

---

## [Using PackageCompiler.jl with Gtk.jl](https://discourse.julialang.org/t/using-packagecompiler-jl-with-gtk-jl/42017)

<div class="topic-metadata">

**Author:** [@Charlie\_Ping](https://discourse.julialang.org/u/Charlie_Ping)\
**Replies:** 7\
**Last updated:** [July 1, 2020, 3:05pm UTC](https://discourse.julialang.org/t/using-packagecompiler-jl-with-gtk-jl/42017 "2020-07-01T15:05:50Z")

</div>

Hi, I’m trying to build a gui using julia. I am running this on ubuntu 20.04 I have a module called TEST TEST/src/TEST.jl code: module TEST using Gtk export real\_main, julia\_main const win = Ref{GtkWindow}() const …

---

## [How to set up NLconstraints from multi-output user-defined function?](https://discourse.julialang.org/t/how-to-set-up-nlconstraints-from-multi-output-user-defined-function/42309)

<div class="topic-metadata">

**Author:** [@Liang\_Chen](https://discourse.julialang.org/u/Liang_Chen)\
**Replies:** 5\
**Last updated:** [July 1, 2020, 2:31pm UTC](https://discourse.julialang.org/t/how-to-set-up-nlconstraints-from-multi-output-user-defined-function/42309 "2020-07-01T14:31:22Z")

</div>

I have a non-linear user-defined function, y = myfun(x), where the output y is a 1\*2 array. I am going to use the output y to construct constraints. I will have 2 constraint equations since y has 2 components and each c…

---

## [How would I update a DataFrame with new data and delete old data so I can maintain the N most recent rows per person](https://discourse.julialang.org/t/how-would-i-update-a-dataframe-with-new-data-and-delete-old-data-so-i-can-maintain-the-n-most-recent-rows-per-person/42368)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [July 1, 2020, 2:26pm UTC](https://discourse.julialang.org/t/how-would-i-update-a-dataframe-with-new-data-and-delete-old-data-so-i-can-maintain-the-n-most-recent-rows-per-person/42368 "2020-07-01T14:26:25Z")

</div>

Hi how’s it going? Here is an example of the dataframe, and a new data row to be added. df = DataFrame(:name=\>\["john","john","john","john","john","mike","mike","mike","mike","mike"\] ,:day=\>\["2020-05-14","2020-05-13","20…

---

## [Graphplot in a loop](https://discourse.julialang.org/t/graphplot-in-a-loop/42340)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 2\
**Last updated:** [July 1, 2020, 1:42pm UTC](https://discourse.julialang.org/t/graphplot-in-a-loop/42340 "2020-07-01T13:42:18Z")

</div>

I would like to use graphplot in a loop inside a function. But graphplot does not return a value. How can this be done? Here is a MWE that demonstrates that I am not getting a plot. using Plots, GraphRecipes, LightGraph…

---

## [Writing in a file?](https://discourse.julialang.org/t/writing-in-a-file/42306)

<div class="topic-metadata">

**Author:** [@JTintern](https://discourse.julialang.org/u/JTintern)\
**Replies:** 6\
**Last updated:** [July 1, 2020, 11:59am UTC](https://discourse.julialang.org/t/writing-in-a-file/42306 "2020-07-01T11:59:08Z")

</div>

Hi, Here’s an overview of my file : Window gained focus --\> CreateSurveyDialog = 'Create 3D survey' --\> frame = 'DataManager' Focus gained --\> TextField = 'MAP\_' --\> CreateSurveyDialog = 'Create 3D survey' MB1 --\> …

---

## [Help Debugging GPU Performance Issue](https://discourse.julialang.org/t/help-debugging-gpu-performance-issue/42274)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 5\
**Last updated:** [July 1, 2020, 10:07am UTC](https://discourse.julialang.org/t/help-debugging-gpu-performance-issue/42274 "2020-07-01T10:07:43Z")

</div>

I’m having trouble debugging the following issue with CuArrays. I see very different performance using the findmax function when I call it from the REPL vs when I use it in my application. From the REPL I get the desired…

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

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