Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L
Lightcurve Database
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • William Fong
  • Lightcurve Database
  • Issues
  • #4

Closed
Open
Created Mar 27, 2020 by William Fong@wcfongMaintainer

Low Level Numpy conversion

As of now, we need to convert numpy arrays to python lists before they can be inserted. The Lightcurve Models already do so automatically when being assigned data. But for anyone that manually performs insertions using SQLAlchemy's Core API will receive a NoneType error on the psycopg2.cursor object. These manual interactions will be rare for the regular user, but bulk methods do rely on them.

For now we need to keep this in mind but I plan on doing the following:

Find a way to have psycopg2 identify numpy array instances and either:

  • Convert the numpy array to a list using nparr.tolist()
  • Providing a custom serializer to perform the convertion of a numpy array to a SQL statement in one go
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None