# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=759

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

**Page:** 760

---

## [On iterating through columns of a data frame and check if they contain String values](https://discourse.julialang.org/t/on-iterating-through-columns-of-a-data-frame-and-check-if-they-contain-string-values/38093)

<div class="topic-metadata">

**Author:** [@abianco](https://discourse.julialang.org/u/abianco)\
**Replies:** 4\
**Last updated:** [April 28, 2020, 8:49pm UTC](https://discourse.julialang.org/t/on-iterating-through-columns-of-a-data-frame-and-check-if-they-contain-string-values/38093 "2020-04-28T20:49:54Z")

</div>

I am still new to Julia and I am a bit confused about how loop through the columns of a data frame and check their type. I have looked into the documentation and couldn’t find any clarification yet, so I am posting this …

---

## [How to find min/max by column from a matrix with missing values?](https://discourse.julialang.org/t/how-to-find-min-max-by-column-from-a-matrix-with-missing-values/38372)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [April 28, 2020, 8:29pm UTC](https://discourse.julialang.org/t/how-to-find-min-max-by-column-from-a-matrix-with-missing-values/38372 "2020-04-28T20:29:54Z")

</div>

This doesn’t (obviously) work: X = \[1 10.5;1.5 missing; 1.8 8; 1.7 15; 3.2 40; 3.6 32; 3.3 38; missing -2.3; 5.2 -2.4\] minX = minimum(X,dims=1) maxX = maximum(X,dims=1) But the problem is that skipmissing() doesn’t kee…

---

## [Using macros to implement function decorators for logging / measuring time](https://discourse.julialang.org/t/using-macros-to-implement-function-decorators-for-logging-measuring-time/38363)

<div class="topic-metadata">

**Author:** [@quatrix](https://discourse.julialang.org/u/quatrix)\
**Replies:** 7\
**Last updated:** [April 28, 2020, 7:18pm UTC](https://discourse.julialang.org/t/using-macros-to-implement-function-decorators-for-logging-measuring-time/38363 "2020-04-28T19:18:42Z")

</div>

Hi All, I’m trying to implement something like Python’s decorators so that I can log whenever a function get’s called (eventually I want to log execution time / exceptions / etc) This is the API I’d like to have: @log…

---

## [Infix function notation for \`setdiff\`](https://discourse.julialang.org/t/infix-function-notation-for-setdiff/38381)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 5\
**Last updated:** [April 28, 2020, 6:40pm UTC](https://discourse.julialang.org/t/infix-function-notation-for-setdiff/38381 "2020-04-28T18:40:41Z")

</div>

I’m looking for suggestions for an infix function for Base.setdiff. I’ve seen $\\setminus$ (∖) used, but that’s not a valid identifier character probably because it’s often indistinguishable from backslash (\\) (Ah yes: be…

---

## [Improving performance of mapping algorithm](https://discourse.julialang.org/t/improving-performance-of-mapping-algorithm/38161)

<div class="topic-metadata">

**Author:** [@Mabo87](https://discourse.julialang.org/u/Mabo87)\
**Replies:** 17\
**Last updated:** [April 28, 2020, 5:30pm UTC](https://discourse.julialang.org/t/improving-performance-of-mapping-algorithm/38161 "2020-04-28T17:30:29Z")

</div>

Hi all, I ported a code from MATLAB to Julia, because it takes too long right now: using Random using Printf start = time() Lk = 4 Lp = 1500 # create test data: coordinates of relative points and points to be mapped p…

---

## [Type stability nested dictionary](https://discourse.julialang.org/t/type-stability-nested-dictionary/38349)

<div class="topic-metadata">

**Author:** [@mopg](https://discourse.julialang.org/u/mopg)\
**Replies:** 3\
**Last updated:** [April 28, 2020, 3:27pm UTC](https://discourse.julialang.org/t/type-stability-nested-dictionary/38349 "2020-04-28T15:27:52Z")

</div>

I am getting a nested input dictionary as input to my code, the structure of which I’d like to preserve. It is a nested dictionary where the “end state” is always an object of the same type (which I know). See the exampl…

---

## [Local inter-dependent packages development workflow](https://discourse.julialang.org/t/local-inter-dependent-packages-development-workflow/38376)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 1\
**Last updated:** [April 28, 2020, 2:45pm UTC](https://discourse.julialang.org/t/local-inter-dependent-packages-development-workflow/38376 "2020-04-28T14:45:32Z")

</div>

When I have local package A that uses local package B, it appears that any code changes to B is not seen by A until the the code from B is committed to git. Is this proper and expected behavior? Is there a way that I c…

---

## [Julia on old desktop vs Matlab on old desktop vs Julia on Raspberry Pi-4](https://discourse.julialang.org/t/julia-on-old-desktop-vs-matlab-on-old-desktop-vs-julia-on-raspberry-pi-4/38162)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 5\
**Last updated:** [April 28, 2020, 2:30pm UTC](https://discourse.julialang.org/t/julia-on-old-desktop-vs-matlab-on-old-desktop-vs-julia-on-raspberry-pi-4/38162 "2020-04-28T14:30:20Z")

</div>

I have an early but complete and working (fairly well) version of a set of routines for analyzing ECG signals for the heart rate. It is mostly based on a popular technique called Pan/Tompkins (published in 1985 that oper…

---

## [Need help to make imfilter calculate only on specifies indices](https://discourse.julialang.org/t/need-help-to-make-imfilter-calculate-only-on-specifies-indices/37963)

<div class="topic-metadata">

**Author:** [@Kunz-David](https://discourse.julialang.org/u/Kunz-David)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 2:32pm UTC](https://discourse.julialang.org/t/need-help-to-make-imfilter-calculate-only-on-specifies-indices/37963 "2020-04-21T14:32:59Z")

</div>

Hi, I have a question about how to use the imfilter! function from ImageFiltering so that is computes only on provided inds. I am having trouble making a simple example work. Here is my code: using ImageFiltering, Imag…

---

## [Convert not defined](https://discourse.julialang.org/t/convert-not-defined/38361)

<div class="topic-metadata">

**Author:** [@Immanuel\_Diener](https://discourse.julialang.org/u/Immanuel_Diener)\
**Replies:** 4\
**Last updated:** [April 28, 2020, 11:22am UTC](https://discourse.julialang.org/t/convert-not-defined/38361 "2020-04-28T11:22:00Z")

</div>

Loading an Image worked fine for months and now suddenly I can’t make it work anymore (since my computer crashed, idk if this is in any way connected). julia\> Pkg.status() Status \`C:\\Users\\immanueldiener\\.julia\\envi…

---

## [Wrapping iterator, caching intermediate transformation](https://discourse.julialang.org/t/wrapping-iterator-caching-intermediate-transformation/38229)

<div class="topic-metadata">

**Author:** [@phg](https://discourse.julialang.org/u/phg)\
**Replies:** 6\
**Last updated:** [April 28, 2020, 10:35am UTC](https://discourse.julialang.org/t/wrapping-iterator-caching-intermediate-transformation/38229 "2020-04-28T10:35:45Z")

</div>

I want to wrap a dictionary in a data structure that lets you iterate over it in sorted order. Is there any more elegant solution than the following? struct Graph # For example's sake statements::Dict{Int, Int} …

---

## [Savefig not showing green in png with intrinsic fonts](https://discourse.julialang.org/t/savefig-not-showing-green-in-png-with-intrinsic-fonts/38334)

<div class="topic-metadata">

**Author:** [@Varghese](https://discourse.julialang.org/u/Varghese)\
**Replies:** 1\
**Last updated:** [April 28, 2020, 10:29am UTC](https://discourse.julialang.org/t/savefig-not-showing-green-in-png-with-intrinsic-fonts/38334 "2020-04-28T10:29:33Z")

</div>

When saving a plot with different colors, saving it to pdf shows the right colors, but with png it does not. In png it will show the right colors for the text with vector fonts but not with intrinsic fonts. I am using G…

---

## [Stop custom type that inherits from SparseArray getting converted to full array](https://discourse.julialang.org/t/stop-custom-type-that-inherits-from-sparsearray-getting-converted-to-full-array/38256)

<div class="topic-metadata">

**Author:** [@james-a-mcmanus](https://discourse.julialang.org/u/james-a-mcmanus)\
**Replies:** 5\
**Last updated:** [April 28, 2020, 10:25am UTC](https://discourse.julialang.org/t/stop-custom-type-that-inherits-from-sparsearray-getting-converted-to-full-array/38256 "2020-04-28T10:25:13Z")

</div>

Hello all, I’m very new to julia and trying to essentially make a wrapper for a sparse-type array. When I set up the type to inherit from AbstractSparseArrays, operations with non-sparse arrays output a full array. usi…

---

## [Calculation of a Jacobian of a set of complex functions in Julia](https://discourse.julialang.org/t/calculation-of-a-jacobian-of-a-set-of-complex-functions-in-julia/38356)

<div class="topic-metadata">

**Author:** [@fermion4](https://discourse.julialang.org/u/fermion4)\
**Replies:** 0\
**Last updated:** [April 28, 2020, 8:05am UTC](https://discourse.julialang.org/t/calculation-of-a-jacobian-of-a-set-of-complex-functions-in-julia/38356 "2020-04-28T08:05:50Z")

</div>

I want to calculate the numerical Jacobian of complex functions using the Julia ForwardDiff package. using ForwardDiff f(θ,i,u) = \[1im \*i \* exp(-1im \* θ), 1im \* u \* exp(-1im \* θ)\] # Complex Current and Voltage z = \[1,…

---

## [Why calculating gradients from Params is different than doing it directly?](https://discourse.julialang.org/t/why-calculating-gradients-from-params-is-different-than-doing-it-directly/38295)

<div class="topic-metadata">

**Author:** [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Replies:** 5\
**Last updated:** [April 28, 2020, 8:05am UTC](https://discourse.julialang.org/t/why-calculating-gradients-from-params-is-different-than-doing-it-directly/38295 "2020-04-28T08:05:20Z")

</div>

I’ve encoutered a case when calculating gradients with two methods yield different results. Here is an excerpt from my code, excluding the actual loss function. julia\> x, y=get\_batch(4) (\[("1c944ea1a3ae18a8df9f411d3c6…

---

## [Performance of collecting a zip where one argument to zip has eltype == Union{Nothing, Int}](https://discourse.julialang.org/t/performance-of-collecting-a-zip-where-one-argument-to-zip-has-eltype-union-nothing-int/38310)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [April 28, 2020, 4:33am UTC](https://discourse.julialang.org/t/performance-of-collecting-a-zip-where-one-argument-to-zip-has-eltype-union-nothing-int/38310 "2020-04-28T04:33:47Z")

</div>

I ran into an interesting performance issue when collecting a zip. Before you say “don’t collect!”, the next step is to feed the collected array into sort, which throws a method error if you feed it a zip iterator. The i…

---

## [Get latest versions of dependencies as of a specific date?](https://discourse.julialang.org/t/get-latest-versions-of-dependencies-as-of-a-specific-date/38326)

<div class="topic-metadata">

**Author:** [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Replies:** 2\
**Last updated:** [April 28, 2020, 2:25am UTC](https://discourse.julialang.org/t/get-latest-versions-of-dependencies-as-of-a-specific-date/38326 "2020-04-28T02:25:20Z")

</div>

I know this is a long-shot, but I thought I’d ask anyway. I’m currently trying to figure out how my tests broke, and because I am probably not as rigorous about setting version bounds on dependencies (lesson learned…), I…

---

## [A small package to run string as shell command](https://discourse.julialang.org/t/a-small-package-to-run-string-as-shell-command/6163)

<div class="topic-metadata">

**Author:** [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Replies:** 8\
**Last updated:** [April 28, 2020, 12:17am UTC](https://discourse.julialang.org/t/a-small-package-to-run-string-as-shell-command/6163 "2020-04-28T00:17:11Z")

</div>

Building a string is easy, but building a Cmd is always a headache to me. So I write a small package to run strings as Cmd. Here is the task that drives me to write the package: There are some sub-folders containing .pn…

---

## [Dev local package not working for test-specific dependencies](https://discourse.julialang.org/t/dev-local-package-not-working-for-test-specific-dependencies/38343)

<div class="topic-metadata">

**Author:** [@yiyuezhuo](https://discourse.julialang.org/u/yiyuezhuo)\
**Replies:** 0\
**Last updated:** [April 27, 2020, 11:38pm UTC](https://discourse.julialang.org/t/dev-local-package-not-working-for-test-specific-dependencies/38343 "2020-04-27T23:38:18Z")

</div>

Let’s say there’re local packages PA, PB and PC. I can add PA to dependencies of PB using (PB) pkg\> dev /PA/local/path and get tests worked. But since PA is a test specific dependencies, when I add PA to test-specific …

---

## [ERROR: TypeError: non-boolean (Int64) used in boolean context](https://discourse.julialang.org/t/error-typeerror-non-boolean-int64-used-in-boolean-context/38340)

<div class="topic-metadata">

**Author:** [@Jing\_Zhang](https://discourse.julialang.org/u/Jing_Zhang)\
**Replies:** 4\
**Last updated:** [April 27, 2020, 10:49pm UTC](https://discourse.julialang.org/t/error-typeerror-non-boolean-int64-used-in-boolean-context/38340 "2020-04-27T22:49:11Z")

</div>

Dear Julia users, My codes work in Julia 0.7.0, but when I tried to run them in Julia 1.0.5, I got the following error. It seems this error happens for multiple common Julia functions such as “findall” and etc… Any sugg…

---

## [Using Distributions](https://discourse.julialang.org/t/using-distributions/38337)

<div class="topic-metadata">

**Author:** [@Jing\_Zhang](https://discourse.julialang.org/u/Jing_Zhang)\
**Replies:** 3\
**Last updated:** [April 27, 2020, 10:36pm UTC](https://discourse.julialang.org/t/using-distributions/38337 "2020-04-27T22:36:04Z")

</div>

Dear Julia Users, I got a problem with “using Distributions” for Julia 1.0.5. Please see below for details. Any idea would be appreciated. julia\> using Distributions \[ Info: Precompiling Distributions \[31c24e10-a181-5…

---

## [Accessing all definitions in a module](https://discourse.julialang.org/t/accessing-all-definitions-in-a-module/37936)

<div class="topic-metadata">

**Author:** [@ckfinite](https://discourse.julialang.org/u/ckfinite)\
**Replies:** 6\
**Last updated:** [April 27, 2020, 7:54pm UTC](https://discourse.julialang.org/t/accessing-all-definitions-in-a-module/37936 "2020-04-27T19:54:57Z")

</div>

For a program analysis tool I’m working on, I need to know about all available functions. However, the traditional suggestion using names does not work for me, with the canonical example happening with NamedTuples. The (…

---

## [String representation of hexadecimal to unicode character](https://discourse.julialang.org/t/string-representation-of-hexadecimal-to-unicode-character/38289)

<div class="topic-metadata">

**Author:** [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Replies:** 4\
**Last updated:** [April 27, 2020, 5:12pm UTC](https://discourse.julialang.org/t/string-representation-of-hexadecimal-to-unicode-character/38289 "2020-04-27T17:12:00Z")

</div>

Is there a builtin function to transform the string representation of an hexadecimal to the corresponding unicode character? # we can for example do julia\> Char(0x03C0) 'π': Unicode U+03c0 (category Ll: Letter, lowercas…

---

## [Dynamically invoke all the methods of a function](https://discourse.julialang.org/t/dynamically-invoke-all-the-methods-of-a-function/38258)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 8\
**Last updated:** [April 27, 2020, 3:35pm UTC](https://discourse.julialang.org/t/dynamically-invoke-all-the-methods-of-a-function/38258 "2020-04-27T15:35:10Z")

</div>

I want to write a function A.x() which in its body automatically invokes all the available methods of A.x(). However, I can’t find the reflection mechanism that allows me to do this. I was hoping methods will do it, but …

---

## [Using Cassette to overdub just some methods](https://discourse.julialang.org/t/using-cassette-to-overdub-just-some-methods/38139)

<div class="topic-metadata">

**Author:** [@lino98](https://discourse.julialang.org/u/lino98)\
**Replies:** 6\
**Last updated:** [April 27, 2020, 3:29pm UTC](https://discourse.julialang.org/t/using-cassette-to-overdub-just-some-methods/38139 "2020-04-27T15:29:52Z")

</div>

I’m working on developing a software that mesure performance of a julia program and i’m using cassette since i have to intercept function calls and modify them, the problem is that when i overdub a function it recursivel…

---

## [Reporting errors with source code position?](https://discourse.julialang.org/t/reporting-errors-with-source-code-position/38288)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 3\
**Last updated:** [April 27, 2020, 2:02pm UTC](https://discourse.julialang.org/t/reporting-errors-with-source-code-position/38288 "2020-04-27T14:02:11Z")

</div>

Is there any standard rules for reporting errors when metaprogramming? For the cases that users give wrong data in runtime or they do not properly use a macro, I want to report them the concrete error message with accur…

---

## [Advice on approximating Complicated integral](https://discourse.julialang.org/t/advice-on-approximating-complicated-integral/38235)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 4\
**Last updated:** [April 27, 2020, 1:03pm UTC](https://discourse.julialang.org/t/advice-on-approximating-complicated-integral/38235 "2020-04-27T13:03:35Z")

</div>

hi everyone i’m trying to solve a system of fixed point equations that involve integrals of this type. so far nesting quadgk calls results with high probability in a domain error, the only thing that helps is using Bi…

---

## [Can \`load\` work faster?](https://discourse.julialang.org/t/can-load-work-faster/38291)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 3\
**Last updated:** [April 27, 2020, 1:00pm UTC](https://discourse.julialang.org/t/can-load-work-faster/38291 "2020-04-27T13:00:39Z")

</div>

I have to load many files in a loop (to be more specific, I’m working with OBJ files to be used with MeshIO). I guess that including a line like load(filename) in the loop, with filename being a string with the file path…

---

## [Improving an algorithm that compute gps distances](https://discourse.julialang.org/t/improving-an-algorithm-that-compute-gps-distances/38213)

<div class="topic-metadata">

**Author:** [@David\_Cardozo](https://discourse.julialang.org/u/David_Cardozo)\
**Replies:** 41\
**Last updated:** [April 27, 2020, 10:20am UTC](https://discourse.julialang.org/t/improving-an-algorithm-that-compute-gps-distances/38213 "2020-04-27T10:20:34Z")

</div>

Hi everyone! Is it possible to parallelize vectorized functions / operations? I have this code I ported from python but it running a little bit slower than numpy and not surprisingly 10x slower than jax (cpu only). u…

---

## [Choosing variables to plot from DifferentialEquations solution](https://discourse.julialang.org/t/choosing-variables-to-plot-from-differentialequations-solution/38252)

<div class="topic-metadata">

**Author:** [@Eris](https://discourse.julialang.org/u/Eris)\
**Replies:** 0\
**Last updated:** [April 26, 2020, 6:21pm UTC](https://discourse.julialang.org/t/choosing-variables-to-plot-from-differentialequations-solution/38252 "2020-04-26T18:21:29Z")

</div>

I understand that vrs is used in order to choose the variables to be plotted. i.e. in this example I plotted x vs y using DifferentialEquations, ParameterizedFunctions, Plots attrac = @ode\_def begin dx = σy dy = ρ(y…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=758)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=760)
