Code Monkey home page Code Monkey logo

Comments (4)

v923z avatar v923z commented on May 18, 2024

I think this has been fixed in the testing branch. (All occurrences of fabs have been replaced by MICROPY_FLOAT_C_FUN(fabs). This is the proper way of handling this issue, because the definition of float is platform dependent: https://micropython-ulab.readthedocs.io/en/latest/ulab.html#ndarray-the-basic-container) Can you, please, compile against testing?

from micropython-ulab.

iabdalkader avatar iabdalkader commented on May 18, 2024

Yes this particular issue is fixed in testing, but in the testing branch numerical.c has other issues:

CC ../../extmod/ulab/code/vectorise.c
../../extmod/ulab/code/numerical.c: In function 'numerical_sum_mean_ndarray':
../../extmod/ulab/code/numerical.c:135:5: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration]
     printf("%ld, %ld\n", m, n);
     ^~~~~~
../../extmod/ulab/code/numerical.c:135:5: error: incompatible implicit declaration of built-in function 'printf' [-Werror]
../../extmod/ulab/code/numerical.c:135:5: note: include '<stdio.h>' or provide a declaration of 'printf'
../../extmod/ulab/code/numerical.c:135:15: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
     printf("%ld, %ld\n", m, n);
             ~~^
             %d
../../extmod/ulab/code/numerical.c:135:20: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Werror=format=]
     printf("%ld, %ld\n", m, n);
                  ~~^
                  %d

Including stdio.h and using %zu fixes it.

Can the array fixes be merged in master ? I don't want to have to fork and maintain this repo.

from micropython-ulab.

v923z avatar v923z commented on May 18, 2024

This printout was there for debugging purposes, and is not needed at all. I have removed it, and pushed the fix to master. Let me know if it still doesn't work. (I could compile it for the unix port.)

from micropython-ulab.

iabdalkader avatar iabdalkader commented on May 18, 2024

It builds now, thanks for fixing it!

from micropython-ulab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.