Skip to content

global Variable for sizing #34

Answered by francof2a
SReiter149 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Hamuel101,
You're right about that default sizing is optimal, and there is a way to define a template for new Fxp objects:

from fxpmath import Fxp

Fxp.template = Fxp(None, True, 32, 10, op_sizing='same') # enable template

x = Fxp(np.random.random((1,400))) 
y = Fxp(np.random.random((400,128)))

Fxp.template = None # disable template

But checking with your example, I found that config parameters are set with default values, so op_sizing is set with 'optimal' again (I'm going to open an issue with this).

There is another concern is about your example. The function np.dot doesn't know how to resolve sizing from op_sizing property of x or y (it could be another issue), you can use so…

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@SReiter149
Comment options

Answer selected by francof2a
Comment options

You must be logged in to vote
2 replies
@francof2a
Comment options

@SReiter149
Comment options

Comment options

You must be logged in to vote
4 replies
@francof2a
Comment options

@SReiter149
Comment options

@francof2a
Comment options

@SReiter149
Comment options

Comment options

You must be logged in to vote
1 reply
@francof2a
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants