Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings in test: all arguments must be numbers #30

Closed
holtzermann17 opened this issue Feb 4, 2020 · 2 comments
Closed

warnings in test: all arguments must be numbers #30

holtzermann17 opened this issue Feb 4, 2020 · 2 comments

Comments

@holtzermann17
Copy link

I am using [org.clojure/clojurescript "1.10.597"]

WARNING: cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead at line 34 resources/public/js/admin/kixi/stats/estimate.cljc
WARNING: cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead at line 54 resources/public/js/admin/kixi/stats/estimate.cljc
WARNING: cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead at line 34 resources/public/js/admin/kixi/stats/estimate.cljc
WARNING: cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead at line 54 resources/public/js/admin/kixi/stats/estimate.cljc
WARNING: cljs.core/>, all arguments must be numbers, got [#{boolean js/Number} number] instead at line 76 resources/public/js/admin/kixi/stats/test.cljc
WARNING: cljs.core//, all arguments must be numbers, got [number #{boolean js/Number}] instead at line 77 resources/public/js/admin/kixi/stats/test.cljc
WARNING: cljs.core/>, all arguments must be numbers, got [#{boolean js/Number} number] instead at line 76 resources/public/js/admin/kixi/stats/test.cljc
WARNING: cljs.core//, all arguments must be numbers, got [number #{boolean js/Number}] instead at line 77 resources/public/js/admin/kixi/stats/test.cljc
@henrygarner
Copy link
Collaborator

@holtzermann17 running lein test-cljs shows all tests as passing after bumping the ClojureScript dependency to 1.10.597. Are you able to provide a minimal example?

@holtzermann17
Copy link
Author

holtzermann17 commented Feb 5, 2020

Here's what I see when compiling:

figwheel_1  | [Figwheel:WARNING] Compile Warning   target/public/cljs-out/admin/kixi/stats/estimate.cljc   line:34  column:13
figwheel_1  | 
figwheel_1  |   cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead
figwheel_1  | 
figwheel_1  |   29    (let [regression (simple-linear-regression sum-squares)
figwheel_1  |   30          y-hat (p/measure regression x)
figwheel_1  |   31          se (regression-standard-error sum-squares x)
figwheel_1  |   32          df (- n 2)
figwheel_1  |   33          t-crit (d/critical-value (d/t {:v df}) alpha)
figwheel_1  |   34          err (* t-crit se)]
figwheel_1  |                   ^---
figwheel_1  |   35      (reify p/PInterval
figwheel_1  |   36        (lower [_] (- y-hat err))
figwheel_1  |   37        (upper [_] (+ y-hat err)))))
Figwheel_1  |   38  
figwheel_1  |   39  (defn regression-prediction-standard-error
figwheel_1  | 
figwheel_1  | [Figwheel:WARNING] Compile Warning   target/public/cljs-out/admin/kixi/stats/estimate.cljc   line:54  column:13
figwheel_1  | 
figwheel_1  |   cljs.core/*, all arguments must be numbers, got [any #{js/Number clj-nil}] instead
figwheel_1  | 
figwheel_1  |   49    (let [regression (simple-linear-regression sum-squares)
figwheel_1  |   50          y-hat (p/measure regression x)
figwheel_1  |   51          se (regression-prediction-standard-error sum-squares x)
figwheel_1  |   52          df (- n 2)
figwheel_1  |   53          t-crit (d/critical-value (d/t {:v df}) alpha)
figwheel_1  |   54          err (* t-crit se)]
figwheel_1  |                   ^---
figwheel_1  |   55      (reify p/PInterval
figwheel_1  |   56        (lower [_] (- y-hat err))
figwheel_1  |   57        (upper [_] (+ y-hat err)))))
figwheel_1  | 
figwheel_1  | [Figwheel:WARNING] Compile Warning   target/public/cljs-out/admin/kixi/stats/test.cljc   line:76  column:16
figwheel_1  | 
figwheel_1  |   cljs.core/>, all arguments must be numbers, got [#{boolean js/Number} number] instead
figwheel_1  | 
figwheel_1  |   71     {mean-y :mean sd-y :sd n-y :n}]
figwheel_1  |   72    (let [sd-xy (and (pos? n-x) (pos? n-y)
figwheel_1  |   73                     (sqrt (+ (/ (sq sd-x) n-x)
figwheel_1  |   74                              (/ (sq sd-y) n-y))))
figwheel_1  |   75          z (and sd-xy
figwheel_1  |   76                 (pos? sd-xy)
figwheel_1  |                      ^---
figwheel_1  |   77                 (double (/ (- mean-x mean-y) sd-xy)))]
figwheel_1  |   78      (when z
figwheel_1  |   79        (test-result z (d/normal {:location 0.0 :scale 1.0})))))
figwheel_1  |   80  
figwheel_1  |   81  (defn t-test

@henrygarner henrygarner closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants