# Latest

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

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

**Page:** 1791

---

## [Reducing sum of OffsetArray](https://discourse.julialang.org/t/reducing-sum-of-offsetarray/36571)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 2\
**Last updated:** [March 27, 2020, 3:57am UTC](https://discourse.julialang.org/t/reducing-sum-of-offsetarray/36571 "2020-03-27T03:57:42Z")

</div>

I’m getting an error with sum(B, dims=1), where B is an OffsetArray. using OffsetArrays A = rand(3,3) B = OffsetArray(A, -1:1, 5:7) sum(A, dims=1) # OK sum(B, dims=1) # errors Here’s the output: Julia-1.4.0\> sum(A…

---

## [Potential bug on relative gap calculation](https://discourse.julialang.org/t/potential-bug-on-relative-gap-calculation/36323)

<div class="topic-metadata">

**Author:** [@Diego](https://discourse.julialang.org/u/Diego)\
**Replies:** 3\
**Last updated:** [March 27, 2020, 2:54am UTC](https://discourse.julialang.org/t/potential-bug-on-relative-gap-calculation/36323 "2020-03-27T02:54:09Z")

</div>

Whatever the MIP tolerance I get the relative mip gap is always zero. I am using: MOI.get(model, MOI.RelativeGap()) JuMP v"0.20.1" Xpress v"0.10.0" Seems to be an issue either in JuMP or in Xpress

---

## [\[ANN\] FamaFrenchData.jl - easy access to Fama-French data](https://discourse.julialang.org/t/ann-famafrenchdata-jl-easy-access-to-fama-french-data/36030)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 4\
**Last updated:** [March 27, 2020, 2:24am UTC](https://discourse.julialang.org/t/ann-famafrenchdata-jl-easy-access-to-fama-french-data/36030 "2020-03-27T02:24:54Z")

</div>

Happy to announce a small package I put together since I’m stuck at home – FamaFrenchData.jl. It provides easy direct access to the Ken French Data Library, which is a popular data source for financial investments resear…

---

## [Show full table](https://discourse.julialang.org/t/show-full-table/36575)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 7\
**Last updated:** [March 27, 2020, 1:02am UTC](https://discourse.julialang.org/t/show-full-table/36575 "2020-03-27T01:02:02Z")

</div>

When I use a feature like print, or enter the name of a table, it shows an abridged table. Is there a way to show a complete table. I’d like to be able to cut and paste.

---

## [Are there any open-source plots relevant to the Julia language ecosystem?](https://discourse.julialang.org/t/are-there-any-open-source-plots-relevant-to-the-julia-language-ecosystem/36569)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 1\
**Last updated:** [March 27, 2020, 12:12am UTC](https://discourse.julialang.org/t/are-there-any-open-source-plots-relevant-to-the-julia-language-ecosystem/36569 "2020-03-27T00:12:09Z")

</div>

I guess this is related to: Outdated page in Julia Package Ecosystem Pulse How do you feel about Julia Observer? - #2 by shorty66 But are there any open-source data sources for tracking the Julia language, ecosystem, …

---

## [How to do Cross Tabs?](https://discourse.julialang.org/t/how-to-do-cross-tabs/36533)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 10:11pm UTC](https://discourse.julialang.org/t/how-to-do-cross-tabs/36533 "2020-03-26T22:11:19Z")

</div>

Is there a package to do Cross Tabulation? I have HypothesisTests and StatsBase, but can’t find anything about Cross Tabulation in the documentation for each.

---

## [Draft of paper on a lightweight mesh library: RFC](https://discourse.julialang.org/t/draft-of-paper-on-a-lightweight-mesh-library-rfc/36532)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 2:31am UTC](https://discourse.julialang.org/t/draft-of-paper-on-a-lightweight-mesh-library-rfc/36532 "2020-03-26T02:31:48Z")

</div>

A number of the people here seem to be interested in PDEs. I hope you will not consider it an imposition if I post here an RFC concerning the draft of the paper on a lightweight mesh library in Julia? Any and all feed…

---

## [Multivariate Correlation Tables-- Partial Correlation Tables](https://discourse.julialang.org/t/multivariate-correlation-tables-partial-correlation-tables/36566)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 8:03pm UTC](https://discourse.julialang.org/t/multivariate-correlation-tables-partial-correlation-tables/36566 "2020-03-26T20:03:23Z")

</div>

In there a way to automatically generarate partial correlation tables?

---

## [How to automate a laborous task (via Metaprogramming? Need to access variables of the current working space)](https://discourse.julialang.org/t/how-to-automate-a-laborous-task-via-metaprogramming-need-to-access-variables-of-the-current-working-space/36438)

<div class="topic-metadata">

**Author:** [@NilsKintscher](https://discourse.julialang.org/u/NilsKintscher)\
**Replies:** 11\
**Last updated:** [March 26, 2020, 7:24pm UTC](https://discourse.julialang.org/t/how-to-automate-a-laborous-task-via-metaprogramming-need-to-access-variables-of-the-current-working-space/36438 "2020-03-26T19:24:43Z")

</div>

I’m writing a module where a user may create and analyze arbitrary “compositions” (expressions) of so-called CrystalOperators. Right now, the manual workflow to analyze an arbitrary composition is quite laborious. I am …

---

## [Pkg error ...HELP](https://discourse.julialang.org/t/pkg-error-help/36562)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 6\
**Last updated:** [March 26, 2020, 7:10pm UTC](https://discourse.julialang.org/t/pkg-error-help/36562 "2020-03-26T19:10:04Z")

</div>

hello guys, I am writing using Pkg but it gets a red underline What should I install or do to fix this error

---

## [Type instability when evaluating prior distributions](https://discourse.julialang.org/t/type-instability-when-evaluating-prior-distributions/19489)

<div class="topic-metadata">

**Author:** [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Replies:** 8\
**Last updated:** [March 26, 2020, 6:43pm UTC](https://discourse.julialang.org/t/type-instability-when-evaluating-prior-distributions/19489 "2020-03-26T18:43:44Z")

</div>

When looking at the @code\_warntype output of the following function using Distributions const priors = \[ Normal(0, 1), Beta(2, 5)\] const pars = \[2.0, 0.9\] function prioreval\_test(priors, pars::Vector{Float64}) if …

---

## [Macro hygiene with try/catch](https://discourse.julialang.org/t/macro-hygiene-with-try-catch/36468)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 14\
**Last updated:** [March 26, 2020, 6:40pm UTC](https://discourse.julialang.org/t/macro-hygiene-with-try-catch/36468 "2020-03-26T18:40:06Z")

</div>

I have a macro that is supposed to define a new function in the caller’s scope (plus do several other things). The code to be evaluated is wrapped in a try/catch block so that if something fails, I can clean things up. …

---

## [Dteremine the type of fields in a struct](https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 1\
**Last updated:** [March 26, 2020, 6:36pm UTC](https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563 "2020-03-26T18:36:43Z")

</div>

Hi, is it possible to know the types of each field in an instance of a struct? Assume I have been given a code that I can’t see, but that includes a struct like this mutable struct kroko{T} where T x :: Int32; y :…

---

## [How do I add arguments to a frequency table?](https://discourse.julialang.org/t/how-do-i-add-arguments-to-a-frequency-table/36517)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 14\
**Last updated:** [March 26, 2020, 5:04pm UTC](https://discourse.julialang.org/t/how-do-i-add-arguments-to-a-frequency-table/36517 "2020-03-26T17:04:34Z")

</div>

I’m trying to do a frequency table with a data frame ‘df’ frequencytable(df) I get an error, argument not provided. What arguments do I need?

---

## [Keyboard shortcuts for discourse site do nothing](https://discourse.julialang.org/t/keyboard-shortcuts-for-discourse-site-do-nothing/36552)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 4:58pm UTC](https://discourse.julialang.org/t/keyboard-shortcuts-for-discourse-site-do-nothing/36552 "2020-03-26T16:58:16Z")

</div>

How does one use the keyboard shortcuts listed in the “Keyboard Shortcuts” menu under the 3-line-menu located in the top left of the Julia Discourse display between the Search (magnifying glass) and the User widgets? Th…

---

## [How to execute Juno after opening Atom?](https://discourse.julialang.org/t/how-to-execute-juno-after-opening-atom/14456)

<div class="topic-metadata">

**Author:** [@Angie\_P](https://discourse.julialang.org/u/Angie_P)\
**Replies:** 13\
**Last updated:** [March 26, 2020, 4:35pm UTC](https://discourse.julialang.org/t/how-to-execute-juno-after-opening-atom/14456 "2020-03-26T16:35:18Z")

</div>

I am on windows. Following the instructions on http://junolab.org/ I have installed Julia 1.0, Atom and the package uber-juno. How can I use the IDE though? When I open Atom I don’t see the plots pane, I don’t see the c…

---

## [Type-instability indexing tuple](https://discourse.julialang.org/t/type-instability-indexing-tuple/36528)

<div class="topic-metadata">

**Author:** [@jonas-kr](https://discourse.julialang.org/u/jonas-kr)\
**Replies:** 5\
**Last updated:** [March 26, 2020, 3:14pm UTC](https://discourse.julialang.org/t/type-instability-indexing-tuple/36528 "2020-03-26T15:14:07Z")

</div>

Is it possible to modify the following piece of code such that it becomes type-stable? julia\> function f(x) for k in eachindex(x) display(x\[k\]) end end; julia\> a = tuple(1:2,1.0:2.0) (1:2, 1…

---

## [Broadcasting in matrix multiplication](https://discourse.julialang.org/t/broadcasting-in-matrix-multiplication/36498)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 11\
**Last updated:** [March 26, 2020, 2:48pm UTC](https://discourse.julialang.org/t/broadcasting-in-matrix-multiplication/36498 "2020-03-26T14:48:05Z")

</div>

Consider a 1x2 matrix A and a 1d array of 2x2 matrices B: A = \[1 2\] B = \[rand(2,2) for \_ in 1:3\] Obviously, B\[1\] is a 2x2 matrix, B\[2\] and B\[3\] as well. Now, I would like to get an array of matrix products \[A\*B\[1\], A\*…

---

## [Including header files for OpenCL kernels](https://discourse.julialang.org/t/including-header-files-for-opencl-kernels/36551)

<div class="topic-metadata">

**Author:** [@swishmas](https://discourse.julialang.org/u/swishmas)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 1:47pm UTC](https://discourse.julialang.org/t/including-header-files-for-opencl-kernels/36551 "2020-03-26T13:47:45Z")

</div>

I think something has changed in the OpenCL.jl package about how to link header files to GPU kernels. It’s either that or I’m missing something crucial about how julia looks for packages and header files and what needs …

---

## [Scalar product in objective](https://discourse.julialang.org/t/scalar-product-in-objective/36550)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [March 26, 2020, 1:43pm UTC](https://discourse.julialang.org/t/scalar-product-in-objective/36550 "2020-03-26T13:43:51Z")

</div>

I’ll illustrate the problem with the following simple example: import JuMP l = ones(4) model= JuMP.Model() JuMP.@variable(model, x) JuMP.@variable(model, y1) JuMP.@variable(model, y2) epxr = \[ JuMP.@expression(model…

---

## [Saving 2D arrays as indexed color images](https://discourse.julialang.org/t/saving-2d-arrays-as-indexed-color-images/36399)

<div class="topic-metadata">

**Author:** [@rio](https://discourse.julialang.org/u/rio)\
**Replies:** 11\
**Last updated:** [March 26, 2020, 1:15pm UTC](https://discourse.julialang.org/t/saving-2d-arrays-as-indexed-color-images/36399 "2020-03-26T13:15:10Z")

</div>

Hi, please, is there a way to save a 2D array of integers as a .png image, where for each integer value in the array I associate a certain color in the output image? I am looking for a solution for Indexed color - Wiki…

---

## [Array and Table not updating in a loop](https://discourse.julialang.org/t/array-and-table-not-updating-in-a-loop/36442)

<div class="topic-metadata">

**Author:** [@bandaya](https://discourse.julialang.org/u/bandaya)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 1:02pm UTC](https://discourse.julialang.org/t/array-and-table-not-updating-in-a-loop/36442 "2020-03-26T13:02:51Z")

</div>

Hello, I am getting some strange behaviour in a loop which is reading some columns from a table and converting it to an array. The loop seems to exit after the first iteration. I have given a simple example below. If I c…

---

## [Problem Solving an "Inverse" ODE w DifferentialEquations.jl](https://discourse.julialang.org/t/problem-solving-an-inverse-ode-w-differentialequations-jl/36521)

<div class="topic-metadata">

**Author:** [@shoshievass](https://discourse.julialang.org/u/shoshievass)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 12:40pm UTC](https://discourse.julialang.org/t/problem-solving-an-inverse-ode-w-differentialequations-jl/36521 "2020-03-26T12:40:34Z")

</div>

I have an ODE that I can solve, but I need to also be able to solve its “inverse”. That is, my normal ode is defined as du\_dx = f(x, u, p) , and I can solve that, but I also need to be able to solve dx\_du = g(x, u, p) (b…

---

## [why shift + enter ( return key ) does not work in atom for windows](https://discourse.julialang.org/t/why-shift-enter-return-key-does-not-work-in-atom-for-windows/12973)

<div class="topic-metadata">

**Author:** [@Lucas\_Pollito](https://discourse.julialang.org/u/Lucas_Pollito)\
**Replies:** 5\
**Last updated:** [March 26, 2020, 11:17am UTC](https://discourse.julialang.org/t/why-shift-enter-return-key-does-not-work-in-atom-for-windows/12973 "2020-03-26T11:17:08Z")

</div>

Hello before, i use shift + enter and the program run the line … now, shift + enter = enter, nothing change … can you help me ? i use windows … this problems is because i run update for julia and atom

---

## [Futamura projections](https://discourse.julialang.org/t/futamura-projections/36486)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 11:07am UTC](https://discourse.julialang.org/t/futamura-projections/36486 "2020-03-26T11:07:56Z")

</div>

I found this video on youtube, which reminds me somehow of julia.

---

## [Type inconsistency for sum function in case of complex CuArrays](https://discourse.julialang.org/t/type-inconsistency-for-sum-function-in-case-of-complex-cuarrays/36540)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 7:57am UTC](https://discourse.julialang.org/t/type-inconsistency-for-sum-function-in-case-of-complex-cuarrays/36540 "2020-03-26T07:57:21Z")

</div>

The result of sum(abs2, a) for complex a is also complex in case of a being a CuArray: using CuArrays a = zeros(ComplexF32, 10) s = sum(abs2, a) @show typeof(s) agpu = CuArrays.zeros(ComplexF32, 10) sgpu = sum(abs2, a…

---

## [Dispatching on the type of a constraint or variable](https://discourse.julialang.org/t/dispatching-on-the-type-of-a-constraint-or-variable/36524)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 2\
**Last updated:** [March 26, 2020, 6:51am UTC](https://discourse.julialang.org/t/dispatching-on-the-type-of-a-constraint-or-variable/36524 "2020-03-26T06:51:54Z")

</div>

Hi, How do I write a function signature such that I can dispatch on whether an argument is a variable or a constraint? I’d like to do this: function f(x::TypeOfVariable) ... end function f(x::TypeOfConstraint) ... end…

---

## [I want to filter a dataframe by a column value and then modify another column in the original dataframe based on the filtered condition. How would I do this?](https://discourse.julialang.org/t/i-want-to-filter-a-dataframe-by-a-column-value-and-then-modify-another-column-in-the-original-dataframe-based-on-the-filtered-condition-how-would-i-do-this/36502)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 6:34am UTC](https://discourse.julialang.org/t/i-want-to-filter-a-dataframe-by-a-column-value-and-then-modify-another-column-in-the-original-dataframe-based-on-the-filtered-condition-how-would-i-do-this/36502 "2020-03-26T06:34:18Z")

</div>

Hi how’s it going? Let me give a simple example Say we have a dataframe df with columns A,B and C. Column B holds integer values between 1 and 40. We then have a list K of a specific subset of column B values \[1,2,3\] I…

---

## [Help with choosing the loosest \[compat\] bounds in Project.toml?](https://discourse.julialang.org/t/help-with-choosing-the-loosest-compat-bounds-in-project-toml/36530)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 6:34am UTC](https://discourse.julialang.org/t/help-with-choosing-the-loosest-compat-bounds-in-project-toml/36530 "2020-03-26T06:34:12Z")

</div>

I’m in the situation that I just made a new package and since I needed to put \[compat\] bounds on all my dependencies to get registered, and since I haven’t been following closely the development of all these dependencies…

---

## [Problem in attaching array type in struct](https://discourse.julialang.org/t/problem-in-attaching-array-type-in-struct/36417)

<div class="topic-metadata">

**Author:** [@Lee](https://discourse.julialang.org/u/Lee)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 6:17am UTC](https://discourse.julialang.org/t/problem-in-attaching-array-type-in-struct/36417 "2020-03-26T06:17:38Z")

</div>

Does anyone know why this stretch is giving error? ´´´ struct lis it = zeros(Int8, 10) beg::Int8 en::Int8 tot::Int8 end ´´´ Thanks!

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

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