• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error involving nd4j

 
Rancher
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am getting the following error:-

Time               Messages                                                                                                                                                                                                                                                        
2020-04-06 15:28:06 java.lang.RuntimeException: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath.
Please see: http://nd4j.org/getstarted.html @ WEKAThreeCrosses100.onBar(WEKAThreeCrosses100.java:402)

The only array I have in my program is a 1 dimentional array CPricesArray which I populate on startup -[300 values]

Part of my code is as follows



when I printout the Array with its initial values - all OK
but when I printout the Array after I have rotated the values, all elements barring the last are OK
and the last element is 0.0 NOT the value I assign to it
The 3 current closing prices have valid values

Not sure what is happening here ?

Thanks

Bob M
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the nd4j backend in your classpath?

Someone here might know nd4j, but if not...

Getting Started wrote:We highly recommend you join our Gitter Live Chat if you have questions

 
Bob Matthews
Rancher
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have moved project to a different Windows 10 machine

No nd4j error now

but can somebody explain why my code for updating the CPricesArray fails on the last element (i.e. CPricesArray[299])

Cheers

Bob M
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Fails" doesn't tell us very much.  Do you get an exception?  What is the error message?  The stack trace?
 
Bob Matthews
Rancher
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have explained the problem above...................

After the shift update the last element of CPricesArray is zero NOT the value I expect and appears to be setup properly before the shift

Bob M
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you saying that this line prints "CPricesArray[299]: 0.0"?  If so, I'd check the value in Close_GBPUSD.
 
Bob Matthews
Rancher
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes - that is what I am seeing

have checked the 3 current closing prices - EURUSD, EURGBP and GBPUSD and all three appear correct ?

but CPricesArray[297] and CPricesArray[298] end up updated and CPricesArray[299] gets a value of 0.0

Bob M
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would add this line and see what it prints:
 
Bob Matthews
Rancher
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apologies - for wasting your time

I had a coding error where Closing_GBPUSD was NOT being updated

Bob M
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm glad you figured it out.  And you didn't waste my time; this is what I do.  (Well, one thing.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic