Git Product home page Git Product logo

Comments (12)

moble avatar moble commented on July 29, 2024

It works for me — even for arrays hundreds of times bigger than that, which is several gigabytes. If you want me to help solve your problem, I really need more information, like a minimal example that reproduces your error, and the error message you get when you try to run it.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

from quaternion.

moble avatar moble commented on July 29, 2024

Again, I'd be happy to try to help you with this, but I can't help unless you give me a minimal example that results in error for you, and the actual error output that you're seeing. For instance, I tried this example, which worked just fine:

import numpy as np
import quaternion
import pandas as pd

df = pd.DataFrame(np.random.rand(2510792, 4))
q = quaternion.as_quat_array(df.values)

And again, I can increase that to be hundreds of times bigger without any problem.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

from quaternion.

moble avatar moble commented on July 29, 2024

I don't see any screenshots, and I really can't help if you don't tell me what the error is. Maybe you should go to this issue's github page to add the information.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

quatissue.docx
I have updated the comments and uploaded the screenshots, I didn't receive any receive any error message, the issue the function is not working as expected.

from quaternion.

moble avatar moble commented on July 29, 2024

I cannot see the screenshots. Please go to this issue's github page #35 and see for yourself. There are no screenshots. You need to show me what is going on, or I cannot help you.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

I have compiled all the screen shots as a msword file and attached. Attaching again. Refer quatissue.docx
quatissue.docx

from quaternion.

moble avatar moble commented on July 29, 2024

This is getting a little ridiculous. I do not have MS Word, and I cannot open docx files. No offense, but I do not know you, and will not trust attachments you attempt to give me.

The standard way of working on github is to go to the issues page, then copy and paste whatever you need into the comment editor provided on that page. It is possible to drag and drop images, though it's better to use text if the image is of text. Please, please, please just do that. If you cannot work in this way, I'm afraid I will be unable to help you.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

Sorry I am new to gitHub, thats why I attaching as a docx file. will paste my all screenshots over here,
image
image
image

I am trying to load this dataframe values into quaternion array using df.values

import numpy as np
import quaternion as quat
import pandas as pd
del_q = quat.as_quat_array(myquats.values)

image
image

as_quat_array works fine but the problem is its working in other way.
From the first few screenshots we know that the first quaternion set is to quaternion(1,0,0,0) but here its quaternion(1,1,1,1).

But if I use the same ‘quat.as_quat_array’ for some reduced length I am to convert it as a quaternion array.
For eg:
del_q = quat.as_quat_array(myquats[:20000].values)
(refer out:27)
here I am converting first 20000 values
In this case the function works as expected.

image

from quaternion.

moble avatar moble commented on July 29, 2024

I think I've figured it out, but this still really isn't enough information to definitively diagnose your problem. Next time you ask for help with someone else's code, you need to think about how they could possibly understand your problem; you should include a minimal working example that shows what you've done, and describe exactly what's going wrong. That is, you need to give them code that allows them to reproduce your problem with as little difficulty as possible, and then explain exactly in what way the result isn't what you expected. Screenshots are not good enough, and they shouldn't have to ask you numerous times to give them basic information like that when they're doing you a favor. Also, you shouldn't expect people to be willing to open random files (like docx or pkl) that you post on the internet; you may be a nice guy, but they have no way of knowing that you're not trying to hack their computer. (Note that the pickle module contains a warning at the very top of the page against opening pickles from untrusted sources.)

Anyway, somehow you appear to have created a pandas array with Fortran ordering. I cannot figure out how you might have done this, but you can probably solve the problem by doing this:

del_q = quat.as_quat_array(np.ascontiguousarray(myquats.values))

I've added this ascontiguousarray call inside the as_quat_array, but it will take a little while for anaconda and pypi to update the package. So for now, just call that function yourself.

from quaternion.

Srinivsankrishnan27 avatar Srinivsankrishnan27 commented on July 29, 2024

It's working like a charm, thanks for the help.

Since I am very new to this forum, I don't know about how the report the issue. Sorry for the inconvenience caused. I would take this as an opportunity to learn how to post an issue in gitHub.

from quaternion.

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.